Skip to content

Commit

Permalink
Merge pull request #1895 from Adslot/eslint-v9
Browse files Browse the repository at this point in the history
chore: upgrade eslint to v9
  • Loading branch information
romi-h authored Feb 4, 2025
2 parents 01a25fd + e8b45b4 commit ae91373
Show file tree
Hide file tree
Showing 7 changed files with 1,181 additions and 1,410 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc

This file was deleted.

59 changes: 59 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import eslintConfigAdslot from 'eslint-config-adslot';
import storybook from 'eslint-plugin-storybook';
import jestDom from 'eslint-plugin-jest-dom';
import jest from 'eslint-plugin-jest';
import testingLibrary from 'eslint-plugin-testing-library';
import typescriptParser from '@typescript-eslint/parser';
import typescriptEslint from '@typescript-eslint/eslint-plugin';

export default [
...eslintConfigAdslot,
...storybook.configs['flat/recommended'],
{
ignores: ['www/examples/*'],
},
{
languageOptions: {
ecmaVersion: 'latest',
parser: typescriptParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
'@typescript-eslint': typescriptEslint,
'jest-dom': jestDom,
},
settings: {
lodash: {
version: 4,
},
'import/resolver': {
alias: {
map: [['testing', './config/testing']],
},
},
},
rules: {
'no-console': [
'error',
{
allow: ['warn', 'error'],
},
],
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['**/?(*.)spec.js?(x)'],
...jest.configs['flat/recommended'],
...jestDom.configs['flat/recommended'],
...testingLibrary.configs['flat/react'],
rules: {
'jest/expect-expect': 'error',
'jest/no-commented-out-tests': 'off',
},
},
];
Loading

0 comments on commit ae91373

Please sign in to comment.