-
-
Notifications
You must be signed in to change notification settings - Fork 888
Eslint config upgrade to 10.0.2 #3801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
MayankJha014
wants to merge
14
commits into
PalisadoesFoundation:develop-postgres
from
MayankJha014:eslint_config_upgrade
Closed
Changes from 7 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4aa1374
Update elsint config upgrade
MayankJha014 3394705
updating package
MayankJha014 bc1527e
Eslint config is created
MayankJha014 c9871d7
Comments resolve
MayankJha014 86c6758
Removing resolved issue
MayankJha014 4d8147d
Schema graphql issue fix
MayankJha014 61e2b73
Schema graphql issue fix
MayankJha014 507dbbb
eslint removed from it
MayankJha014 687101e
remvoing unused graphql remove that part
MayankJha014 1d25eca
Sensitive file reducing its uncessary changes
MayankJha014 610f76a
Comments resolve
MayankJha014 687d4e9
Inc code covergae by adding fix-readme-links
MayankJha014 9384c11
Inc code covergae by adding fix-readme-links
MayankJha014 1b995ec
Inc code covergae by adding fix-readme-links
MayankJha014 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
schema: 'schema.graphql' | ||
documents: './src/**/*.graphql' | ||
extensions: | ||
eslint: | ||
rules: | ||
'@graphql-eslint/known-type-names': 'error' | ||
'@graphql-eslint/no-unreachable-types': 'off' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,147 @@ | ||
import js from "@eslint/js"; | ||
import ts from "@typescript-eslint/eslint-plugin"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import react from "eslint-plugin-react"; | ||
import prettier from "eslint-plugin-prettier"; // Import naming changed for clarity | ||
import vitest from "eslint-plugin-vitest"; | ||
import tsdoc from "eslint-plugin-tsdoc"; | ||
import graphql from "@graphql-eslint/eslint-plugin"; | ||
import imports from "eslint-plugin-import"; | ||
import js from '@eslint/js'; | ||
import ts from '@typescript-eslint/eslint-plugin'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import react from 'eslint-plugin-react'; | ||
import prettier from 'eslint-plugin-prettier'; // Import naming changed for clarity | ||
import vitest from 'eslint-plugin-vitest'; | ||
import tsdoc from 'eslint-plugin-tsdoc'; | ||
import graphql from '@graphql-eslint/eslint-plugin'; | ||
import imports from 'eslint-plugin-import'; | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
"node_modules", | ||
"dist", | ||
"build", | ||
"package.json", | ||
"package-lock.json", | ||
"tsconfig.json", | ||
"fix-readme-links.js", | ||
"fix-repo-url.js", | ||
"src/components/CheckIn/tagTemplate.ts", | ||
"docs/**", | ||
"*.md", | ||
"docker/**", | ||
"config/docker/setup/nginx*.conf", | ||
"**/*.css", | ||
"**/*.scss", | ||
"**/*.less", | ||
"**/*.json", | ||
"**/*.svg" | ||
'node_modules', | ||
'dist', | ||
'build', | ||
'package.json', | ||
'package-lock.json', | ||
'tsconfig.json', | ||
'fix-readme-links.js', | ||
'fix-repo-url.js', | ||
'src/components/CheckIn/tagTemplate.ts', | ||
'docs/**', | ||
'*.md', | ||
'docker/**', | ||
'config/docker/setup/nginx*.conf', | ||
'**/*.css', | ||
'**/*.scss', | ||
'**/*.less', | ||
'**/*.json', | ||
'**/*.svg', | ||
'schema.graphql', | ||
'vitest.setup.ts', | ||
], | ||
}, | ||
{ | ||
files: ["*.ts", "*.tsx"], | ||
files: ['*.ts', '*.tsx'], | ||
languageOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
parser: tsParser, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
globals: { | ||
window: "readonly", | ||
localStorage: "readonly", | ||
setTimeout: "readonly", | ||
window: 'readonly', | ||
localStorage: 'readonly', | ||
setTimeout: 'readonly', | ||
}, | ||
}, | ||
plugins: { | ||
react, | ||
"@typescript-eslint": ts, | ||
'@typescript-eslint': ts, | ||
vitest, | ||
tsdoc, | ||
"@graphql-eslint": graphql, | ||
'@graphql-eslint': graphql, | ||
import: imports, | ||
prettier, | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
...js.configs.recommended.rules, | ||
...ts.configs.recommended.rules, | ||
"react/destructuring-assignment": "error", | ||
"react/no-multi-comp": ["error", { ignoreStateless: false }], | ||
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }], | ||
"import/no-duplicates": "error", | ||
"tsdoc/syntax": "error", | ||
"@typescript-eslint/ban-ts-comment": "error", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/no-non-null-assertion": "error", | ||
"@typescript-eslint/consistent-type-assertions": "error", | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ selector: "interface", format: ["PascalCase"], prefix: ["I"] }, | ||
{ selector: ["typeAlias", "typeLike", "enum"], format: ["PascalCase"] }, | ||
{ selector: "typeParameter", format: ["PascalCase"], prefix: ["T"] }, | ||
{ selector: "variable", format: ["camelCase", "UPPER_CASE", "PascalCase"], leadingUnderscore: "allow" }, | ||
{ selector: "parameter", format: ["camelCase"], leadingUnderscore: "allow" }, | ||
{ selector: "function", format: ["camelCase", "PascalCase"] }, | ||
{ selector: "memberLike", modifiers: ["private"], format: ["camelCase"], leadingUnderscore: "require" }, | ||
{ selector: "variable", modifiers: ["exported"], format: null }, | ||
'react/destructuring-assignment': 'error', | ||
'react/no-multi-comp': ['error', { ignoreStateless: false }], | ||
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], | ||
'import/no-duplicates': 'error', | ||
'tsdoc/syntax': 'error', | ||
'@typescript-eslint/ban-ts-comment': 'error', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/no-non-null-assertion': 'error', | ||
'@typescript-eslint/consistent-type-assertions': 'error', | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ selector: 'interface', format: ['PascalCase'], prefix: ['I'] }, | ||
{ selector: ['typeAlias', 'typeLike', 'enum'], format: ['PascalCase'] }, | ||
{ selector: 'typeParameter', format: ['PascalCase'], prefix: ['T'] }, | ||
{ | ||
selector: 'variable', | ||
format: ['camelCase', 'UPPER_CASE', 'PascalCase'], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ | ||
selector: 'parameter', | ||
format: ['camelCase'], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ selector: 'function', format: ['camelCase', 'PascalCase'] }, | ||
{ | ||
selector: 'memberLike', | ||
modifiers: ['private'], | ||
format: ['camelCase'], | ||
leadingUnderscore: 'require', | ||
}, | ||
{ selector: 'variable', modifiers: ['exported'], format: null }, | ||
], | ||
'react/jsx-pascal-case': [ | ||
'error', | ||
{ allowAllCaps: false, allowNamespace: false }, | ||
], | ||
"react/jsx-pascal-case": ["error", { allowAllCaps: false, allowNamespace: false }], | ||
"react/no-this-in-sfc": "error", | ||
"react/no-unstable-nested-components": ["error", { allowAsProps: true }], | ||
"prettier/prettier": "error", // This rule should now work correctly | ||
"vitest/no-disabled-tests": "warn", | ||
"vitest/no-focused-tests": "error", | ||
"vitest/no-identical-title": "error", | ||
"@typescript-eslint/no-unused-expressions": "error", | ||
'react/no-this-in-sfc': 'error', | ||
'react/no-unstable-nested-components': ['error', { allowAsProps: true }], | ||
'prettier/prettier': 'error', // This rule should now work correctly | ||
'vitest/no-disabled-tests': 'warn', | ||
'vitest/no-focused-tests': 'error', | ||
'vitest/no-identical-title': 'error', | ||
'@typescript-eslint/no-unused-expressions': 'error', | ||
}, | ||
}, | ||
{ | ||
files: ["*.spec.ts", "*.test.ts", "*.spec.tsx", "*.test.tsx"], | ||
files: ['*.spec.ts', '*.test.ts', '*.spec.tsx', '*.test.tsx'], | ||
languageOptions: { | ||
globals: { | ||
describe: "readonly", | ||
test: "readonly", | ||
expect: "readonly", | ||
beforeEach: "readonly", | ||
afterEach: "readonly", | ||
describe: 'readonly', | ||
test: 'readonly', | ||
expect: 'readonly', | ||
beforeEach: 'readonly', | ||
afterEach: 'readonly', | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ["*.graphql"], | ||
files: ['*.graphql'], | ||
languageOptions: { | ||
parser: graphql.parser, | ||
}, | ||
plugins: { | ||
"@graphql-eslint": graphql, | ||
'@graphql-eslint': graphql, | ||
prettier, | ||
}, | ||
rules: { | ||
"@typescript-eslint/consistent-type-imports": "off", | ||
"@typescript-eslint/naming-convention": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@graphql-eslint/known-type-names": "error", | ||
"@graphql-eslint/no-unreachable-types": "off", | ||
"prettier/prettier": ["error", { endOfLine: "auto" }], | ||
'@typescript-eslint/consistent-type-imports': 'off', | ||
'@typescript-eslint/naming-convention': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@graphql-eslint/known-type-names': 'error', | ||
'@graphql-eslint/no-unreachable-types': 'off', | ||
'prettier/prettier': ['error', { endOfLine: 'auto' }], | ||
}, | ||
}, | ||
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.