Skip to content

Commit 273da6d

Browse files
committed
- Linting: Switch to having a recommended extension ("js" since file had comments)
- Linting: Ignore `node_modules` (useful if examining files) - Linting: Use required `ecmaVersion` minimum of 2015 - Linting: Fix broken property in config - Maintenance: Add `.editorconfig` - npm: Add `eslint` as devDep. - npm: Add `lint` script - npm: Add recommended fields such as "keywords" - npm: Remove extra WS; remove unneeded `node_modules` portion of paths - npm: Bump mocha to 7 (requires Node 6, but `engines` already expects >= 8)
1 parent 8e61d09 commit 273da6d

File tree

6 files changed

+944
-62
lines changed

6 files changed

+944
-62
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[lib/parser.js]
12+
indent_size = 2
13+
14+
[.travis.yml]
15+
indent_size = 2
16+
17+
[package.json]
18+
indent_size = 2

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
lib/parser.js
2+
node_modules

.eslintrc renamed to .eslintrc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
{
1+
module.exports = {
22
"env": {
33
"node": true
44
},
55

66
"parserOptions": {
7+
ecmaVersion: 2015,
78
"sourceType": "module"
89
},
910

@@ -153,7 +154,7 @@
153154
"array-bracket-newline": "off",
154155
"array-bracket-spacing": ["error", "never"],
155156
"array-element-newline": "off",
156-
"block-spacing": ["error", "always"], "off", // TODO: enable with "stroustrup" (or "1tbsp" + lots of cleanup)
157+
"block-spacing": "off", // ["error", "always"] // TODO: enable with "stroustrup" (or "1tbsp" + lots of cleanup)
157158
"brace-style": ["error", "1tbs"],
158159
"camelcase": "error",
159160
"capitalized-comments": "off",
@@ -312,4 +313,4 @@
312313
"template-curly-spacing": ["error", "never"],
313314
"yield-star-spacing": ["error", "before"]
314315
}
315-
}
316+
};

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.eslintrc
1+
.eslintrc.js
22
.gitignore
33
.npmignore
44
CONTRIBUTING.md

0 commit comments

Comments
 (0)