Skip to content

Commit 48bc06a

Browse files
committedOct 10, 2022
[eslint] add eslint; rules to enable later are warnings
1 parent b32d9bd commit 48bc06a

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed
 

‎.eslintrc

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"root": true,
3+
4+
"extends": "@ljharb/eslint-config/node/0.4",
5+
6+
"rules": {
7+
"array-bracket-spacing": 0,
8+
"array-element-newline": 0,
9+
"brace-style": 1,
10+
"camelcase": 1,
11+
"comma-dangle": 1,
12+
"comma-spacing": 1,
13+
"complexity": 0,
14+
"curly": 1,
15+
"dot-notation": 1,
16+
"eol-last": 1,
17+
"func-style": 1,
18+
"function-paren-newline": 1,
19+
"indent": [1, 4],
20+
"key-spacing": 1,
21+
"max-lines-per-function": 0,
22+
"max-nested-callbacks": 1,
23+
"max-statements": 0,
24+
"multiline-comment-style": 1,
25+
"no-array-constructor": 1,
26+
"no-continue": 1,
27+
"no-div-regex": 1,
28+
"no-extra-parens": 1,
29+
"no-mixed-operators": 1,
30+
"no-multi-spaces": 1,
31+
"no-multiple-empty-lines": 1,
32+
"no-param-reassign": 1,
33+
"no-plusplus": 1,
34+
"no-proto": 1,
35+
"no-redeclare": 1,
36+
"no-restricted-syntax": 1,
37+
"no-shadow": 1,
38+
"no-trailing-spaces": 1,
39+
"no-unused-vars": 1,
40+
"no-use-before-define": 1,
41+
"object-curly-newline": 1,
42+
"object-curly-spacing": 1,
43+
"operator-linebreak": 1,
44+
"quote-props": 1,
45+
"quotes": 1,
46+
"semi-style": 1,
47+
"semi": 1,
48+
"space-before-blocks": 1,
49+
"space-before-function-paren": 1,
50+
"space-infix-ops": 1,
51+
"strict": 1,
52+
"wrap-regex": 1,
53+
},
54+
}

‎package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
"description": "parse argument options",
55
"main": "index.js",
66
"devDependencies": {
7+
"@ljharb/eslint-config": "^21.0.0",
78
"aud": "^2.0.1",
9+
"eslint": "=8.8.0",
810
"nyc": "^10.3.2",
911
"tape": "^5.6.1"
1012
},
1113
"scripts": {
1214
"prepack": "npmignore --auto --commentLines=auto",
13-
"test": "nyc tape test/*.js",
15+
"lint": "eslint --ext=js,mjs .",
16+
"pretest": "npm run lint",
17+
"tests-only": "nyc tape test/*.js",
18+
"test": "npm run tests-only",
1419
"posttest": "aud --production"
1520
},
1621
"testling": {

0 commit comments

Comments
 (0)