chore: Switch from JSCS to ESLint

This commit is contained in:
Antriksh Yadav
2020-10-17 18:27:25 -07:00
committed by Remy Sharp
parent 03c4ed3b76
commit 66ec7cd414
5 changed files with 659 additions and 988 deletions

19
.eslintrc.json Normal file
View File

@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"space-before-function-paren": [
2,
{
"anonymous": "ignore",
"named": "never"
}
]
}
}

View File

@@ -16,7 +16,7 @@ This will allow for the automatic changelog to generate correctly.
## Code standards
Ensure that your code adheres to the included `.jshintrc` and `.jscsrc` configs.
Ensure that your code adheres to the included `.jshintrc` and `.eslintrc.json` configs.
## Sending pull requests

13
.jscsrc
View File

@@ -1,13 +0,0 @@
{
"preset": "node-style-guide",
"requireCapitalizedComments": null,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true,
"beforeOpeningRoundBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"excludeFiles": ["node_modules/**"],
"disallowSpacesInFunction": null
}

1609
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@
"scripts": {
"commitmsg": "commitlint -e",
"coverage": "istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js",
"lint": "jscs lib/**/*.js -v",
"lint": "eslint lib/**/*.js",
":spec": "node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js",
"test": "npm run lint && npm run spec",
"spec": "for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done",
@@ -46,9 +46,9 @@
"@commitlint/config-angular": "^3.1.1",
"async": "1.4.2",
"coffee-script": "~1.7.1",
"eslint": "^7.11.0",
"husky": "^0.14.3",
"istanbul": "^0.4.5",
"jscs": "^3.0.7",
"mocha": "^2.5.3",
"proxyquire": "^1.8.0",
"semantic-release": "^8.2.3",