-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
33 lines (27 loc) · 838 Bytes
/
eslint.config.mjs
File metadata and controls
33 lines (27 loc) · 838 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
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettierPlugin from 'eslint-plugin-prettier';
export default [
// Ignore the dist directory
{ ignores: ['dist'] },
// Files to lint
{ files: ['**/*.{js,mjs,cjs,ts}'] },
// JavaScript files config
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
// Language options for all files
{ languageOptions: { globals: globals.browser } },
// Recommended configs
pluginJs.configs.recommended,
...tseslint.configs.recommended,
// Prettier and custom rules
{
plugins: {
prettier: prettierPlugin, // Correctly specify the Prettier plugin here
},
rules: {
'prettier/prettier': 'error', // Treat Prettier issues as errors
'no-var': 'error',
},
},
];