forked from 4minitz/4minitz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
80 lines (75 loc) · 2.52 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import meteor from "eslint-plugin-meteor";
import lodash from "eslint-plugin-lodash";
import noJquery from "eslint-plugin-no-jquery";
import babel from "@babel/eslint-plugin";
import promise from "eslint-plugin-promise";
import deprecate from "eslint-plugin-deprecate";
import jsdoc from "eslint-plugin-jsdoc";
import globals from "globals";
import babelParser from "@babel/eslint-parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default [{
ignores: ["client/4minitz.html"],
}, ...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:meteor/recommended",
"plugin:lodash/canonical",
"prettier",
"plugin:node/recommended",
"plugin:you-dont-need-lodash-underscore/compatible",
"plugin:no-jquery/all",
"plugin:promise/recommended",
"plugin:mocha-cleanup/recommended",
"plugin:mocha/recommended",
)), {
plugins: {
meteor: fixupPluginRules(meteor),
lodash: fixupPluginRules(lodash),
"no-jquery": fixupPluginRules(noJquery),
"@babel": babel,
promise: fixupPluginRules(promise),
deprecate,
jsdoc,
'@stylistic',
stylistic: StylisticPlugin
},
StylisticPlugin.configs['disable-legacy'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
parser: babelParser,
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-import": "off",
"lodash/prefer-lodash-method": "off",
"lodash/prefer-lodash-typecheck": "off",
"lodash/prefer-get": "off",
"lodash/prefer-noop": "off",
"lodash/prefer-constant": "off",
"lodash/preferred-alias": "error",
"@stylistic/new-cap": "error",
"@babel/no-invalid-this": "error",
"@babel/no-unused-expressions": "error",
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/semi": "error",
"prefer-template": "error",
eqeqeq: ["error", "smart"],
"object-shorthand": ["error", "always"],
},
}];