-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.mjs
37 lines (36 loc) · 1.11 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import globals from 'globals';
import pluginJs from '@eslint/js';
import pluginReact from 'eslint-plugin-react';
import pluginPrettier from 'eslint-plugin-prettier';
export default [
{
files: ['**/*.{js,mjs,cjs,jsx}'],
languageOptions: {
globals: globals.browser,
},
plugins: {
react: pluginReact,
prettier: pluginPrettier,
},
rules: {
'no-console': 'warn',
'prettier/prettier': 'error',
eqeqeq: 'error',
curly: 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-cond-assign': ['error', 'always'],
'no-constant-condition': 'error',
'no-debugger': 'error',
'array-bracket-spacing': ['error', 'never'],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs'],
camelcase: ['error', { properties: 'always' }],
'comma-dangle': ['error', 'always-multiline'],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:prettier/recommended', 'prettier'],
},
pluginJs.configs.recommended,
];