-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy patheslint.config.js
More file actions
35 lines (32 loc) · 1010 Bytes
/
eslint.config.js
File metadata and controls
35 lines (32 loc) · 1010 Bytes
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
import globals from 'globals';
import pluginJs from '@eslint/js';
export default [
// Recommended configuration from @eslint/js
pluginJs.configs.recommended,
// Language options
{
languageOptions: {
globals: {
...globals.browser, // Use browser globals as needed
// Add other globals if necessary
},
},
},
// Main configuration
{
files: ['*'], // Apply to all files
ignores: ['**/*.config.js', '/*.eslint-config-inspector'], // Ignore config files
rules: {
// 'no-unused-vars': 'warn', // Warn about unused variables
semi: ['warn', 'always'], // Require semicolons
quotes: ['warn', 'single'], // Enforce single quotes
'no-undef': 'warn', // Warn on undefined variables
'no-redeclare': 'error',
'no-empty': 'warn',
},
linterOptions: {
noInlineConfig: true, // Disallow inline configuration comments
reportUnusedDisableDirectives: 'error', // Report unused disable directives
},
},
];