-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Focused Improvements] .eslintrc updates (#760)
* Modularized package .eslintrc each package extends the base repo's .eslintrc. typescript and react configs have been pulled out into their own eslint-config files in a new eslint-config directory at the repo root. This should make linting easier to maintain when adding additional frameworks, and will necessitate less file changes in the future. * Updated disable-next-line comments to work with new structure * Line endings added * Readd mistakenly removed rules, remove redudent extends * Remove trailing comma * Fixed linebreak-style rule * Revert no-unused-vars change * Add newlines to package*.json in root, also trimlines dev: true * Revert ignorePattern * Remove parser options
- Loading branch information
Showing
22 changed files
with
151 additions
and
131 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,3 +1,3 @@ | ||
{ | ||
"editor.fontSize": 13, | ||
} | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
extends: ['plugin:react/recommended'], | ||
plugins: ['react'], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
globals: { | ||
React: 'writable', | ||
JSX: 'true', | ||
}, | ||
}; |
This file contains 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
extends: ['plugin:@typescript-eslint/recommended'], | ||
rules: { | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
format: ['PascalCase'], | ||
selector: 'typeLike', | ||
custom: { | ||
regex: '^I[A-Z]', | ||
match: false, | ||
}, | ||
}, | ||
], | ||
'@typescript-eslint/member-ordering': 'error', | ||
'@typescript-eslint/no-use-before-define': ['error', { functions: false, variables: false }], | ||
'@typescript-eslint/typedef': 'error', | ||
'@typescript-eslint/type-annotation-spacing': 'error', | ||
'@typescript-eslint/semi': 'error', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
}, | ||
globals: { | ||
RequestInit: 'true', | ||
}, | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -34,4 +34,4 @@ | |
"prettier": "^1.14.3", | ||
"typescript": "^3.9.6" | ||
} | ||
} | ||
} |
This file contains 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,9 +1,7 @@ | ||
{ | ||
"extends": [ | ||
"plugin:@angular-eslint/recommended", | ||
"../../.eslintrc" | ||
], | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,6 +1,6 @@ | ||
{ | ||
"extends": "../../.eslintrc", | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
} | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,6 +1,6 @@ | ||
{ | ||
"extends": "../../.eslintrc", | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
} | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,6 +1,6 @@ | ||
{ | ||
"extends": "../../.eslintrc", | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,7 +1,6 @@ | ||
{ | ||
"extends": "../../.eslintrc", | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,15 +1,7 @@ | ||
{ | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"../../.eslintrc" | ||
], | ||
"plugins": ["react"], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"globals": { | ||
"React": "writable" | ||
} | ||
"../../.eslintrc", | ||
"../../eslint-configs/react", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,6 +1,6 @@ | ||
{ | ||
"extends": "../../.eslintrc", | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,19 +1,10 @@ | ||
{ | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"../../.eslintrc" | ||
"../../.eslintrc", | ||
"../../eslint-configs/react", | ||
"../../eslint-configs/typescript" | ||
], | ||
"plugins": ["react"], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"globals": { | ||
"React": "writable" | ||
}, | ||
"rules": { | ||
"react/prop-types": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"rules": { | ||
"react/prop-types": "off" | ||
} | ||
} |
This file contains 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,19 +1,17 @@ | ||
{ | ||
"extends": ["../../.eslintrc"], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["react-native", "@typescript-eslint"], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
], | ||
"plugins": [ | ||
"react-native" | ||
], | ||
"env": { | ||
"jest": true | ||
}, | ||
"ignorePatterns": ["src/**/*.test.*", "src/tests/*", "src/testData/*"], | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/indent": ["error", 2] | ||
} | ||
"ignorePatterns": [ | ||
"src/**/*.test.*", | ||
"src/tests/*", | ||
"src/testData/*" | ||
] | ||
} |
This file contains 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,18 +1,7 @@ | ||
{ | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"../../.eslintrc" | ||
], | ||
"plugins": ["react"], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"globals": { | ||
"React": "writable" | ||
}, | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"../../.eslintrc", | ||
"../../eslint-configs/react", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,6 +1,6 @@ | ||
{ | ||
"extends": "../../.eslintrc", | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,7 +1,7 @@ | ||
{ | ||
"extends": ["plugin:vue/recommended", "../../.eslintrc"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"extends": [ | ||
"plugin:vue/recommended", | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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,6 +1,6 @@ | ||
{ | ||
"extends": "../../.eslintrc", | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
"extends": [ | ||
"../../.eslintrc", | ||
"../../eslint-configs/typescript" | ||
] | ||
} |
This file contains 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.