-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(*): Fix eslint configs (#2140)
Co-authored-by: Philipp Gfeller <[email protected]>
- Loading branch information
Showing
18 changed files
with
223 additions
and
232 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
{ | ||
// Fixes tsconfig not found error in nested .eslintrc.json files with relative paths | ||
"eslint.workingDirectories": ["packages/intranet-header-workspace"] | ||
} |
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,2 @@ | ||
dist | ||
src/components/stencil-generated |
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,23 +1,28 @@ | ||
{ | ||
"env": { | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"overrides": [ | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"env": { | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"overrides": [ | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"@typescript-eslint" | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"rules": { | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,3 +2,8 @@ | |
dist | ||
loader | ||
www | ||
.stencil | ||
cypress | ||
stencil.config.ts | ||
cypress.config.js | ||
.eslintrc.js |
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,77 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
node: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@stencil-community/recommended', | ||
], | ||
overrides: [], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
tsconfigRootDir: __dirname, | ||
project: 'tsconfig.eslint.json', | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
'indent': [ | ||
'error', | ||
2, | ||
{ | ||
SwitchCase: 1, | ||
}, | ||
], | ||
'quotes': ['error', 'single'], | ||
'semi': ['error', 'always'], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
caughtErrors: 'none', | ||
destructuredArrayIgnorePattern: '^_', | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
'@stencil-community/strict-boolean-conditions': 'off', | ||
'@stencil-community/required-prefix': ['error', ['post-']], | ||
'@stencil-community/async-methods': 'error', | ||
'@stencil-community/decorators-context': 'error', | ||
'@stencil-community/decorators-style': [ | ||
'error', | ||
{ | ||
prop: 'inline', | ||
state: 'inline', | ||
element: 'inline', | ||
event: 'inline', | ||
method: 'multiline', | ||
watch: 'multiline', | ||
listen: 'multiline', | ||
}, | ||
], | ||
'@stencil-community/class-pattern': [ | ||
'error', | ||
{ | ||
pattern: '^Post.*(?!Component)$', | ||
}, | ||
], | ||
'@stencil-community/element-type': 'error', | ||
'@stencil-community/host-data-deprecated': 'error', | ||
'@stencil-community/methods-must-be-public': 'error', | ||
'@stencil-community/no-unused-watch': 'error', | ||
'@stencil-community/own-methods-must-be-private': 'error', | ||
'@stencil-community/own-props-must-be-private': 'error', | ||
'@stencil-community/prefer-vdom-listener': 'error', | ||
'@stencil-community/props-must-be-public': 'error', | ||
'@stencil-community/props-must-be-readonly': 'error', | ||
'@stencil-community/render-returns-host': 'error', | ||
'@stencil-community/required-jsdoc': 'error', | ||
'@stencil-community/reserved-member-names': 'error', | ||
'@stencil-community/single-export': 'error', | ||
'@stencil-community/strict-mutable': 'error', | ||
'react/jsx-no-bind': 'off', | ||
}, | ||
}; |
This file was deleted.
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
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,10 +1,5 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
"src", | ||
"**/tests" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
"include": ["src", "**/tests"], | ||
"exclude": ["node_modules"] | ||
} |
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,2 @@ | ||
.angular | ||
dist |
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,51 +1,41 @@ | ||
module.exports = { | ||
"root": true, | ||
"ignorePatterns": [ | ||
"projects/**/*" | ||
], | ||
"overrides": [ | ||
root: true, | ||
ignorePatterns: ['projects/**/*'], | ||
overrides: [ | ||
{ | ||
"files": [ | ||
"*.ts" | ||
], | ||
"parserOptions": { | ||
"project": [ | ||
"tsconfig.json" | ||
], | ||
"tsconfigRootDir": __dirname, | ||
"createDefaultProgram": true | ||
files: ['*.ts'], | ||
parserOptions: { | ||
project: ['tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
createDefaultProgram: true, | ||
}, | ||
"extends": [ | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
extends: [ | ||
'plugin:@angular-eslint/recommended', | ||
'plugin:@angular-eslint/template/process-inline-templates', | ||
], | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
rules: { | ||
'@angular-eslint/directive-selector': [ | ||
'error', | ||
{ | ||
"type": "attribute", | ||
"prefix": "app", | ||
"style": "camelCase" | ||
} | ||
type: 'attribute', | ||
prefix: 'app', | ||
style: 'camelCase', | ||
}, | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
'@angular-eslint/component-selector': [ | ||
'error', | ||
{ | ||
"type": "element", | ||
"prefix": "app", | ||
"style": "kebab-case" | ||
} | ||
] | ||
} | ||
type: 'element', | ||
prefix: 'app', | ||
style: 'kebab-case', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
"files": [ | ||
"*.html" | ||
], | ||
"extends": [ | ||
"plugin:@angular-eslint/template/recommended" | ||
], | ||
"rules": {} | ||
} | ||
] | ||
} | ||
files: ['*.html'], | ||
extends: ['plugin:@angular-eslint/template/recommended'], | ||
rules: {}, | ||
}, | ||
], | ||
}; |
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,10 @@ | ||
.stencil | ||
loader | ||
www | ||
dist | ||
node_modules | ||
stencil.config.ts | ||
cypress.config.js | ||
jest.config.js | ||
src/assets | ||
.eslintrc.js |
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,23 @@ | ||
module.exports = { | ||
extends: ['plugin:@stencil-community/recommended'], | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2020, | ||
tsconfigRootDir: __dirname, | ||
project: 'tsconfig.eslint.json', | ||
}, | ||
rules: { | ||
'@stencil-community/element-type': 1, | ||
// Needed for DropdownElement | ||
'@stencil/decorators-context': 0, | ||
// This is a broken rule with eslint 8 (https://github.com/stencil-community/stencil-eslint/issues/60) | ||
'@stencil/own-methods-must-be-private': 0, | ||
// Seems to be buggy as well | ||
'@stencil/async-methods': 0, | ||
// Also buggy | ||
'@stencil/no-unused-watch': 0, | ||
// Buggy | ||
'react/jsx-no-bind': 0, | ||
// No performance problem anymore https://medium.com/@ryanflorence/react-inline-functions-and-performance-bdff784f5578 | ||
}, | ||
}; |
Oops, something went wrong.