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 e85aa6b commit 67160e6
Show file tree
Hide file tree
Showing 16 changed files with 403 additions and 495 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.yml

This file was deleted.

47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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'],
},
tsconfigRootDir: import.meta.dirname,
},
},
});
Loading

0 comments on commit 67160e6

Please sign in to comment.