-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
49 lines (47 loc) · 1.29 KB
/
index.js
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
48
49
const js = require('@eslint/js');
const stylisticJsPlugin = require('@stylistic/eslint-plugin-js');
const importPlugin = require('eslint-plugin-import');
const nodePlugin = require('eslint-plugin-n');
const privatePropsPlugin = require('eslint-plugin-private-props');
const reactPlugin = require('eslint-plugin-react');
const sortKeysFixPlugin = require('eslint-plugin-sort-keys-fix');
const vuePlugin = require('eslint-plugin-vue');
const globals = require('globals');
const vueEslintParser = require('vue-eslint-parser');
const rules = require('./rules.js');
/** @type {import('eslint').Linter.Config[]} */
const configs = [
js.configs.recommended,
reactPlugin.configs.flat.recommended,
...vuePlugin.configs['flat/recommended'],
{
languageOptions: {
parser: vueEslintParser,
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.node,
...globals.es6,
...globals.node,
},
},
plugins: {
react: reactPlugin,
'private-props': privatePropsPlugin,
n: nodePlugin,
vue: vuePlugin,
import: importPlugin,
'sort-keys-fix': sortKeysFixPlugin,
'@stylistic/js': stylisticJsPlugin,
},
rules,
},
];
module.exports = configs;
module.exports.default = configs;