Skip to content

Commit b37d3c1

Browse files
author
Robert Jackson
committed
Add linting configuration.
1 parent b8a2cfa commit b37d3c1

File tree

5 files changed

+512
-14
lines changed

5 files changed

+512
-14
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/fixtures/

.eslintrc.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['eslint:recommended', 'prettier', 'plugin:node/recommended'],
4+
plugins: ['prettier', 'node'],
5+
parserOptions: {
6+
ecmaVersion: 2017,
7+
},
8+
env: {
9+
node: true,
10+
},
11+
rules: {
12+
'prettier/prettier': 'error',
13+
},
14+
15+
overrides: [
16+
{
17+
files: ['tests/**/*.js'],
18+
env: {
19+
jest: true
20+
}
21+
}
22+
]
23+
};

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5",
4+
"printWidth": 100
5+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"@babel/preset-env": "^7.0.0-beta.42",
55
"babel-core": "^6.26.0",
66
"babel-preset-env": "^1.6.1",
7-
"jest": "^21.0.0"
7+
"eslint": "^4.19.1",
8+
"eslint-config-prettier": "^2.9.0",
9+
"eslint-plugin-node": "^6.0.1",
10+
"eslint-plugin-prettier": "^2.6.0",
11+
"jest": "^21.0.0",
12+
"prettier": "^1.12.1"
813
},
914
"name": "babel-plugin-debug-macros",
1015
"version": "0.2.0-beta.2",

0 commit comments

Comments
 (0)