Skip to content

Commit

Permalink
Migrate eslint from 8 to 9 using flat configs
Browse files Browse the repository at this point in the history
  • Loading branch information
schorfES committed Sep 27, 2024
1 parent 1a6d7e4 commit 25a5423
Show file tree
Hide file tree
Showing 5 changed files with 936 additions and 2,421 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

89 changes: 0 additions & 89 deletions .eslintrc

This file was deleted.

49 changes: 49 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// @ts-check

import globals from 'globals';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
{
// Javascript specific config
files: ['**/*.js'],
rules: {
'indent': ['error', 'tab'],
'@typescript-eslint/no-require-imports': ['off'],
},
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
ecmaVersion: 6,
},
},
{
// Typescript specific config
files: ['**/*.ts'],
rules: {
'@typescript-eslint/consistent-type-definitions': ['off'],
},
},
{
// Test specific config
files: ['**/*.test.ts'],
rules: {},
},
{
ignores: [
'.cache/',
'.parcel-cache/',
'coverage/',
'node_modules/',
'public/',
'dist/',
'web/',
],
}
);
Loading

0 comments on commit 25a5423

Please sign in to comment.