Switch linting to ESLint and Prettier (#191)

* Switch linting to ESLint and Prettier
* Clean up config
* Prettier fixes
This commit was merged in pull request #191.
This commit is contained in:
BehindTheMath
2019-02-13 22:26:57 -05:00
committed by GitHub
parent 2c6506af65
commit 3c1a4b2e18
23 changed files with 4674 additions and 2222 deletions

View File

@@ -28,13 +28,16 @@
"types": "index.d.ts",
"devDependencies": {
"browserify": "^15.0.0",
"jscs": "^3.0.7",
"eslint": "^5.7.0",
"eslint-config-i-am-meticulous": "^11.0.0",
"husky": "^1.2.0",
"jsdom": "^11.5.1",
"jsdom-global": "^3.0.2",
"jshint": "^2.5.6",
"lint-staged": "^8.1.0",
"npmpub": "^3.1.0",
"nyc": "^11.4.1",
"opn-cli": "^3.1.0",
"prettier": "^1.14.3",
"serve": "^6.4.4",
"tap-nyc": "^1.0.3",
"tap-spec": "^4.1.1",
@@ -42,7 +45,7 @@
"uglify-js": "^3.3.8"
},
"scripts": {
"lint": "jscs . && jshint . --exclude-path .gitignore",
"lint": "eslint .",
"standalone": "browserify index.js --standalone Pjax > pjax.js",
"build": "npm run standalone && uglifyjs pjax.js -o pjax.min.js",
"build-debug": "browserify index.js --debug --standalone Pjax > pjax.js",
@@ -53,5 +56,17 @@
"example": "opn http://localhost:3000/example/ && serve -p 3000 .",
"prepublish": "npm run build",
"release": "npmpub"
},
"husky": {
"hooks": {
"pre-commit": "npm test && lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"prettier --write",
"git add"
]
}
}