Skip to content

Commit

Permalink
Update to eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Oct 9, 2024
1 parent a27d289 commit 9350c7f
Show file tree
Hide file tree
Showing 16 changed files with 408 additions and 495 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.yml

This file was deleted.

52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import js from '@eslint/js';
import prettierEslint from 'eslint-config-prettier';
import tseslint from 'typescript-eslint';

export default tseslint.config({
extends: [js.configs.recommended, prettierEslint, ...tseslint.configs.strictTypeChecked],
ignores: ['**/app/', '**/dist/'],
rules: {
'arrow-parens': 'error',
eqeqeq: 'error',
'grouped-accessor-pairs': 'error',
'no-console': 'error',
'no-extra-parens': 'off',
'no-loss-of-precision': 'error',
'no-sequences': 'error',
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-unused-expressions': 'error',
'no-useless-concat': 'error',
'no-var': 'error',
radix: 'error',
semi: 'error',
'sort-imports': [
'error',
{
// only sort inside groups, not between separate import lines
ignoreDeclarationSort: true,
},
],
// disabled rules
'sort-keys': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-deprecated': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
},
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: [
'eslint.config.mjs',
'src/map/plotly/plotly-scatter.js',
'python/webpack.config.labextension.js',
'python/webpack.config.nbextension.js',
],
},
tsconfigRootDir: import.meta.dirname,
},
},
});
Loading

0 comments on commit 9350c7f

Please sign in to comment.