-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update eslint and fix warnings (#1378)
* fix(cli): upgrade eslint * fix(cli): update eslint version and fix config logic * fix(cli): add missing files * fix(cli): add version 14.3.14-beta.0 * fix(cli): update glob to 11.0.0 and fix tests * fix(cli): remove rimraf under 5 versions, inflight and glob under 10 version from yarn lock * fix(cli): fix yarn lock and release verison 14.3.14-beta.1 * fix(cli): upgrade eslint plugin react hooks to fix react error * fix(cli): release version 14.3.14-beta.2 * fix(cli): upgrade coveralls version to 2.4.0 * fix(cli): revert coveralls upgrade * fix(cli): turn off no internal modules import * fix(cli): fix typo * fix(cli): revert change in configuration * fix(cli): increase chunk size when build react and web components add terser to minify the code * chore(cli): release version 14.3.14-beta.3 * fix(cli): change eslint config file names * fix(cli): add packages in angular package json * fix(cli): add missing configs for angular eslint * chore(cli): release version 14.3.14-beta.4 * fix(cli): add terser options * chore(cli): release version 14.3.14-beta.5 * fix(cli): update eslint configuration for react and wc * fix(cli): update lint command in package json files * chore(cli): release version 14.3.14-beta.6 * chore(cli): release version 14.3.14-beta.7 * fix(cli): fix configurations for es lint * chore(cli): release version 14.3.14-beta.8 * fix(cli): remove pure comment error from wc projects * fix(cli): add fixes in angular configuration * chore(cli): release version 14.3.14-beta.9 * fix(cli): add option for angular templates to disable optionalChainNotNullable check * chore(cli): release version 14.3.14-beta.10 * fix: build and lint errors from a project for all components and scenarios * fix: clear more lint warnings and build errors. --------- Co-authored-by: Hristo Hristov <[email protected]> Co-authored-by: lipata <[email protected]>
- Loading branch information
1 parent
1849e0c
commit aa84345
Showing
49 changed files
with
565 additions
and
478 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
import eslintPluginImport from 'eslint-plugin-import'; | ||
import eslintPluginUnicorn from 'eslint-plugin-unicorn'; | ||
import eslintPluginPreferArrow from 'eslint-plugin-prefer-arrow'; | ||
import typescriptParser from '@typescript-eslint/parser'; | ||
|
||
export default [ | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
languageOptions: { | ||
globals: { | ||
browser: true, | ||
es6: true, | ||
node: true | ||
}, | ||
//"extends": [ | ||
// TODO: consider extending the recommended by ts rules and overriding them where necessary | ||
// 'eslint:recommended', | ||
// 'plugin:@typescript-eslint/recommended' | ||
//], | ||
parser: typescriptParser, | ||
parserOptions: { | ||
project: '**/tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
}, | ||
plugins: { | ||
'eslint-plugin-import': eslintPluginImport, | ||
'eslint-plugin-unicorn': eslintPluginUnicorn, | ||
'eslint-plugin-prefer-arrow': eslintPluginPreferArrow, | ||
//"@typescript-eslint" - install it if we extend the recommended ts rules | ||
}, | ||
rules: { | ||
'complexity': 'off', | ||
'eslint-plugin-import/no-extraneous-dependencies': 'warn', | ||
'eslint-plugin-import/no-internal-modules': 'warn', | ||
'eslint-plugin-import/order': [ | ||
'off', | ||
{ | ||
alphabetize: { | ||
caseInsensitive: true, | ||
order: 'asc', | ||
}, | ||
'newlines-between': 'ignore', | ||
groups: [ | ||
[ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'unknown', | ||
'object', | ||
'type', | ||
], | ||
'parent', | ||
['sibling', 'index'], | ||
], | ||
distinctGroup: false, | ||
pathGroupsExcludedImportTypes: [], | ||
pathGroups: [ | ||
{ | ||
pattern: './', | ||
patternOptions: { nocomment: true, dot: true }, | ||
group: 'sibling', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: '.', | ||
patternOptions: { nocomment: true, dot: true }, | ||
group: 'sibling', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: '..', | ||
patternOptions: { nocomment: true, dot: true }, | ||
group: 'parent', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: '../', | ||
patternOptions: { nocomment: true, dot: true }, | ||
group: 'parent', | ||
position: 'before', | ||
}, | ||
], | ||
}, | ||
], | ||
'no-constant-condition': 'warn', | ||
'no-case-declarations': 'off', | ||
'no-extra-boolean-cast': 'warn', | ||
'no-unused-vars': 'off', | ||
'no-unexpected-multiline': 'off', | ||
'no-useless-escape': 'off', | ||
'new-parens': 'error', | ||
'no-bitwise': 'off', | ||
'no-caller': 'error', | ||
'no-cond-assign': 'error', | ||
'no-console': 'off', | ||
'no-debugger': 'error', | ||
'no-duplicate-case': 'error', | ||
'no-duplicate-imports': 'error', | ||
'no-empty': 'off', | ||
'no-empty-function': 'off', | ||
'no-eval': 'error', | ||
'no-extra-bind': 'error', | ||
'no-fallthrough': 'off', | ||
'no-invalid-this': 'off', | ||
'no-new-func': 'error', | ||
'no-new-wrappers': 'error', | ||
'no-redeclare': 'error', | ||
'no-return-await': 'error', | ||
'no-sequences': 'error', | ||
'no-shadow': 'off', | ||
'no-sparse-arrays': 'error', | ||
'no-template-curly-in-string': 'error', | ||
'no-throw-literal': 'error', | ||
'no-trailing-spaces': 'error', | ||
'no-undef-init': 'error', | ||
'no-underscore-dangle': 'off', | ||
'no-unsafe-finally': 'error', | ||
'no-unused-expressions': 'off', | ||
'no-unused-labels': 'error', | ||
'no-use-before-define': 'off', | ||
'no-var': 'error', | ||
'object-shorthand': 'warn', | ||
'one-var': ['error', 'never'], | ||
'prefer-arrow/prefer-arrow-functions': 'off', | ||
'prefer-const': 'warn', | ||
'prefer-object-spread': 'off', | ||
'radix': 'error', | ||
'space-in-parens': ['error', 'never'], | ||
'unicorn/prefer-ternary': 'off', | ||
'use-isnan': 'error', | ||
'valid-typeof': 'off', | ||
}, | ||
}, | ||
{ | ||
ignores: [ | ||
'/node_modules/**/*', | ||
'/coverage/**/*', | ||
'/output/**/*', | ||
'/packages/cli/templates/**/*', | ||
'**/files/**/*' | ||
] | ||
}, | ||
]; |
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
2 changes: 1 addition & 1 deletion
2
...es/cli/templates/angular/ig-ts/line-chart/default/files/src/app/assets/line-chart-data.ts
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
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.