Skip to content

Commit 16093ca

Browse files
committed
chore(scripts): add linter using eslint & @boringcodes/eslint-config
1 parent 1f8a228 commit 16093ca

File tree

5 files changed

+753
-16
lines changed

5 files changed

+753
-16
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@boringcodes/eslint-config'],
3+
};

.huskyrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"hooks": {
3-
"pre-commit": "yarn format:stage",
3+
"pre-commit": "yarn format:stage && yarn lint",
44
}
55
}

generators/app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = class extends Generator {
4545
type: 'input',
4646
name: 'elementAuthor',
4747
message: 'Author?',
48-
default: `${gitName} \<${gitEmail}\>`,
48+
default: `${gitName} <${gitEmail}>`,
4949
},
5050
];
5151

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"format": "prettier --write .",
1717
"format:check": "prettier --check .",
1818
"format:stage": "pretty-quick --staged",
19+
"lint": "eslint --ignore-path .gitignore --ignore-pattern templates .",
1920
"release": "standard-version --no-verify",
2021
"release:major": "yarn release --release-as major",
2122
"release:minor": "yarn release --release-as minor",
@@ -31,8 +32,16 @@
3132
"yosay": "^2.0.2"
3233
},
3334
"devDependencies": {
35+
"@boringcodes/eslint-config": "^1.0.0",
3436
"@boringcodes/prettier-config": "^1.0.0",
3537
"change-case": "^4.1.1",
38+
"eslint-config-prettier": "^6.10.1",
39+
"eslint-config-standard": "^14.1.1",
40+
"eslint-plugin-import": "^2.20.1",
41+
"eslint-plugin-node": "^11.0.0",
42+
"eslint-plugin-promise": "^4.2.1",
43+
"eslint-plugin-standard": "^4.0.1",
44+
"eslint": "^6.8.0",
3645
"husky": "^4.2.3",
3746
"prettier": "^2.0.2",
3847
"pretty-quick": "^2.0.1",

0 commit comments

Comments
 (0)