forked from ansh/jiffyreader.com
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
35 lines (34 loc) · 973 Bytes
/
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
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginOrganizeImports from 'eslint-plugin-organize-imports';
import pathAlias from 'eslint-plugin-path-alias';
import globals from 'globals';
/** @type {import('eslint').Linter.Config[]} */
export default [
{
languageOptions: {
globals: { ...globals['shared-node-browser'], ...globals.node },
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
},
eslintConfigPrettier,
{
plugins: {
'path-alias': pathAlias,
'organize-imports': eslintPluginOrganizeImports,
import: eslintPluginImport,
},
rules: {
'path-alias/no-relative': ['error', { exceptions: ['*.module.css'] }],
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/no-relative-packages': 'error',
'no-undef': ['error'],
'no-unused-vars': 'error',
},
},
];