-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy patheslint.config.js
More file actions
47 lines (44 loc) · 1.3 KB
/
eslint.config.js
File metadata and controls
47 lines (44 loc) · 1.3 KB
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
38
39
40
41
42
43
44
45
46
47
import js from '@eslint/js';
import compat from 'eslint-plugin-compat';
import importPlugin from 'eslint-plugin-import';
import json from 'eslint-plugin-json';
import prettier from 'eslint-plugin-prettier';
import babelEslintParser from '@babel/eslint-parser';
export default [
// Base configuration
js.configs.recommended,
compat.configs['flat/recommended'],
importPlugin.flatConfigs.recommended,
json.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022, // Matches es2022 from env and ecmaVersion 13
sourceType: 'module',
parser: babelEslintParser
},
plugins: {
json: json,
prettier: prettier
},
rules: {
'no-unused-private-class-members': 'off',
'no-prototype-builtins': 'off',
'default-case': 'error',
eqeqeq: 'error',
'guard-for-in': 'error',
'no-self-compare': 'error',
'no-void': 'error',
radix: 'error',
'wrap-iife': ['error', 'inside'],
'import/first': 'warn',
'import/no-absolute-path': 'error',
'import/no-deprecated': 'warn',
'import/no-mutable-exports': 'warn',
'prettier/prettier': 'error'
},
settings: {
// Polyfills for compat plugin
polyfills: ['Array.prototype.includes', 'Promise', 'fetch'] // Adjust based on your needs
}
}
];