Skip to content

Commit

Permalink
Add json to linting tools
Browse files Browse the repository at this point in the history
  • Loading branch information
dxdc committed Jul 4, 2020
1 parent fa5e2d3 commit 74dc0b2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 38 deletions.
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

23 changes: 23 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"es6": true,
"node": true
},
"plugins": ["json"],
"extends": ["eslint:recommended", "plugin:json/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"indent": ["error", 4],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"no-console": "off"
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "A homebridge plugin to control my blinds",
"main": "index.js",
"scripts": {
"format": "prettier --write config.schema.json *.js",
"lint": "eslint *.js",
"format": "prettier --write config.schema.json .eslintrc.json *.js",
"lint": "eslint *.js *.json",
"test": "echo \"Error: no test specified\" && exit"
},
"keywords": [
Expand Down Expand Up @@ -40,6 +40,7 @@
},
"devDependencies": {
"eslint": "^7.4.0",
"eslint-plugin-json": "^2.1.1",
"prettier": "^2.0.5",
"rimraf": "^3.0.2"
}
Expand Down

0 comments on commit 74dc0b2

Please sign in to comment.