Skip to content

Commit

Permalink
build: migrate eslint to flat config (#2914)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Plischke authored Aug 28, 2024
1 parent 3c465cb commit f696960
Show file tree
Hide file tree
Showing 8 changed files with 568 additions and 929 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

31 changes: 0 additions & 31 deletions .eslintrc.json

This file was deleted.

40 changes: 40 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import react from 'eslint-plugin-react';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import js from '@eslint/js';
import pluginPromise from 'eslint-plugin-promise';

export default [
js.configs.recommended,
pluginPromise.configs['flat/recommended'],
prettierRecommended,
{
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
...react.configs.flat.recommended,
},
{
ignores: ['.docusaurus/', '**/*tests/', '**/*build/'],
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

ecmaVersion: 'latest',
sourceType: 'module',
},

settings: {
react: {
version: 'detect',
},
},

rules: {
'react/prop-types': 'off',
'prettier/prettier': ['error'],
},
},
];
Loading

0 comments on commit f696960

Please sign in to comment.