Skip to content

Commit ccd9323

Browse files
committed
⬆️ eslint & grunt-eslint
1 parent ad76358 commit ccd9323

6 files changed

+184
-304
lines changed

.eslintrc.json

-52
This file was deleted.

Gruntfile.coffee

-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = (grunt) ->
88
grunt.loadNpmTasks 'grunt-eslint'
99
grunt.loadNpmTasks 'grunt-jsonlint'
1010
grunt.loadNpmTasks 'grunt-coffeelint'
11-
grunt.loadNpmTasks 'grunt-markdownlint'
1211

1312
# ================================= Settings ================================= #
1413
# Force use of Unix newlines
@@ -79,8 +78,6 @@ module.exports = (grunt) ->
7978
# ------
8079
# JS
8180
eslint:
82-
options:
83-
overrideConfigFile: '.eslintrc.json'
8481
target: ['src/*.js']
8582
# JSON
8683
jsonlint:

eslint.config.js

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
const js = require("@eslint/js");
2+
const globals = require("globals");
3+
4+
module.exports = [
5+
js.configs.recommended,
6+
{
7+
languageOptions: {
8+
ecmaVersion: 2022,
9+
sourceType: "module",
10+
globals: {
11+
...globals.mocha,
12+
...globals.node,
13+
},
14+
},
15+
rules: {
16+
"array-bracket-spacing": 2,
17+
"brace-style": 2,
18+
camelcase: 2,
19+
"comma-dangle": 0,
20+
"comma-spacing": 2,
21+
"comma-style": 2,
22+
"computed-property-spacing": 2,
23+
curly: 2,
24+
"dot-location": [2, "property"],
25+
"dot-notation": 2,
26+
"eol-last": 2,
27+
eqeqeq: 2,
28+
"guard-for-in": 2,
29+
indent: [
30+
2,
31+
4,
32+
{
33+
SwitchCase: 1,
34+
VariableDeclarator: 0,
35+
},
36+
],
37+
"key-spacing": 2,
38+
"newline-after-var": 2,
39+
"no-caller": 2,
40+
"no-console": 0,
41+
"no-else-return": 2,
42+
"no-eval": 2,
43+
"no-extend-native": 2,
44+
"no-lonely-if": 2,
45+
"no-loop-func": 2,
46+
"no-multi-spaces": 2,
47+
"no-trailing-spaces": 2,
48+
"one-var": [2, "never"],
49+
quotes: [2, "single", "avoid-escape"],
50+
semi: 2,
51+
"space-before-blocks": 2,
52+
"space-before-function-paren": 2,
53+
"space-in-parens": 2,
54+
"space-unary-ops": [
55+
2,
56+
{
57+
nonwords: false,
58+
words: true,
59+
},
60+
],
61+
strict: [2, "global"],
62+
"vars-on-top": 2,
63+
yoda: 2,
64+
},
65+
},
66+
];

0 commit comments

Comments
 (0)