Skip to content

Commit 584b284

Browse files
committed
build(npm): update dependencies and build config
1 parent 3ccae64 commit 584b284

File tree

9 files changed

+64
-33
lines changed

9 files changed

+64
-33
lines changed

.czrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "cz-conventional-changelog"
3+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintrc.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ module.exports = {
44
es6: true,
55
node: true,
66
},
7-
extends: ["airbnb", "plugin:prettier/recommended"],
8-
plugins: ["prettier"],
7+
extends: ["airbnb", "prettier"],
8+
plugins: [],
99
globals: {
1010
Atomics: "readonly",
1111
SharedArrayBuffer: "readonly",
1212
},
1313
parserOptions: {
1414
ecmaVersion: 2018,
1515
},
16-
rules: {
17-
"prettier/prettier": "error",
18-
},
16+
ignorePatterns: ["!.*.js"],
17+
rules: {},
1918
};

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
echo committing as $(git config user.name)
5+
npx lint-staged

.huskyrc.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

.lintstagedrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
"*.js": ["eslint --fix", "prettier --write"],
3+
};

.prettierrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
module.exports = {
2+
tabWidth: 2,
3+
useTabs: false,
4+
semi: true,
5+
singleQuote: false,
6+
quoteProps: "as-needed",
27
trailingComma: "es5",
3-
arrowParens: "avoid",
8+
bracketSpacing: true,
9+
arrowParens: "always",
10+
htmlWhitespaceSensitivity: "css",
11+
vueIndentScriptAndStyle: false,
12+
endOfLine: "lf",
413
};

package.json

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
"src/9.x.js"
1010
],
1111
"scripts": {
12-
"commit": "npx git cz",
13-
"lint": "npx eslint --ext .js --ignore-path .gitignore .",
14-
"fix": "npm run lint -- --fix",
12+
"commit": "git cz",
13+
"lint": "npm run eslint && npm run prettier",
14+
"eslint": "eslint --ext .js --fix --ignore-path .gitignore .",
15+
"prettier": "prettier '**/*.js' --write --ignore-path .gitignore",
1516
"prerelease": "npm run lint",
16-
"release": "npx standard-version"
17+
"release": "git add src/. && git add index.js && standard-version -a",
18+
"prepare": "husky install"
1719
},
1820
"repository": {
1921
"type": "git",
@@ -33,24 +35,29 @@
3335
},
3436
"homepage": "https://github.com/coldfrontlabs/eslint-plugin-drupal-contrib#readme",
3537
"dependencies": {
36-
"eslint-config-airbnb": "^18.2.0",
37-
"eslint-config-prettier": "^6.11.0",
38-
"eslint-plugin-import": "^2.22.0",
39-
"eslint-plugin-jsx-a11y": "^6.3.1",
40-
"eslint-plugin-prettier": "^3.1.4",
41-
"eslint-plugin-react": "^7.20.6"
38+
"eslint-config-airbnb": "^18.2.1",
39+
"eslint-config-prettier": "^8.3.0",
40+
"eslint-plugin-import": "^2.24.2",
41+
"eslint-plugin-jquery": "^1.5.1",
42+
"eslint-plugin-jsx-a11y": "^6.4.1",
43+
"eslint-plugin-prettier": "^4.0.0",
44+
"eslint-plugin-react": "^7.26.0",
45+
"eslint-plugin-react-hooks": "^4.2.0",
46+
"eslint-plugin-yml": "^0.10.1"
4247
},
4348
"peerDependencies": {
4449
"eslint": "^7.8.1",
4550
"prettier": "^2.1.1"
4651
},
4752
"devDependencies": {
48-
"@commitlint/cli": "^11.0.0",
49-
"@commitlint/config-conventional": "^11.0.0",
50-
"commitizen": "^4.2.1",
53+
"@commitlint/cli": "^13.1.0",
54+
"@commitlint/config-conventional": "^13.1.0",
55+
"commitizen": "^4.2.3",
56+
"cz-conventional-changelog": "^3.3.0",
5157
"eslint": "^7.8.1",
52-
"husky": "^4.3.0",
53-
"prettier": "^2.1.1",
54-
"standard-version": "^9.0.0"
58+
"husky": "^7.0.2",
59+
"lint-staged": "^11.1.2",
60+
"prettier": "^2.2.1",
61+
"standard-version": "^9.2.0"
5562
}
5663
}

0 commit comments

Comments
 (0)