-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy patheslint.config.js
More file actions
37 lines (33 loc) · 1.07 KB
/
eslint.config.js
File metadata and controls
37 lines (33 loc) · 1.07 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
const js = require('@eslint/js');
const { fixupPluginRules } = require('@eslint/compat');
const globals = require('globals');
const { defineConfig } = require('eslint/config');
const jsdoc = require('eslint-plugin-jsdoc');
const eslintPluginYouDontNeedLodashUnderscore = require('eslint-plugin-you-dont-need-lodash-underscore');
const mochaGlobals = {
describe : "readonly",
it : "readonly",
expect : "readonly",
agent : "writable"
};
const angularGlobals= {
angular: "readonly",
}
module.exports = defineConfig([
js.configs.recommended,
jsdoc.configs['flat/recommended'],
{
files: ['**/*.{js,mjs,cjs}'],
extends: ['js/recommended'],
plugins: {
js,
jsdoc,
'you-dont-need-lodash-underscore': fixupPluginRules(eslintPluginYouDontNeedLodashUnderscore),
},
rules: {
...eslintPluginYouDontNeedLodashUnderscore.configs.compatible.rules,
},
languageOptions: { globals: {...globals.browser, ...globals.node, ...mochaGlobals, ...angularGlobals } }
},
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
]);