Skip to content

Commit caf5083

Browse files
npm v7 & dependency improvements (#234)
The npm CLI v7 [1] introduced the new `package-lock.json` format v2 [2] that unlocks the ability to do deterministically reproducible builds and includes everything npm needs to fully build the package tree. Since this is a new major version the current `package-lock.json` file has been updated to the new format. At the same time outdated dependencies have been upgraded to their latest, compatible version. This also changes the versions to use the `^` caret range selector [7] to reduce the overhead of updating dependencies. - `@arcticicestudio/eslint-config-base` [5] - the minimum versions have been bumped from `0.5.0` to `0.11.0` [6]. - `babel-eslint` [3] -> [`@babel/eslint-parser`][4] - the `babel-eslint` package is deprecated and is now available as `@babel/eslint-parser`. - `eslint-plugin-json` [8] -> [`eslint-plugin-jsonc`][9] - since Visual Studio Code uses JSONC [10] the `eslint-plugin-jsonc` matches better to the scope of this repository. It also utilizies the ESLint engine by passing the AST to it. - `del-cli` [13] - updated from version `1.1.0` [11] to `^4.0.1` [12]. - `eslint` [14] - updated from version `5.16.0` [15] to `^7.32.0` [16]. - `eslint-plugin-import` [17] - updated from version `2.17.3` [18] to `^2.24.2` [19]. - `eslint-plugin-prettier` [20] - updated from version `3.1.0` [18] to `^4.0.0` [22]. - `prettier` [23] - updated from version `1.17.1` [24] to `^2.4.1` [25]. - `remark-cli` [26] - updated from version `6.0.1` [27] to `^9.0.0` [28]. - `remark-preset-lint-arcticicestudio` [29] -> `@arcticicestudio/remark-preset-lint` [30] - the `remark-preset-lint-arcticicestudio` package is deprecated and is now available as `@arcticicestudio/remark-preset-lint`. This also includes the linting and adjusting for matches that are found after running with the new rules. - `vsce` [31] - updated from version `6.0.1` [32] to `^1.100.0` [33]. [1]: https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli [2]: https://blog.npmjs.org/post/621733939456933888/npm-v7-series-why-keep-package-lockjson [3]: https://github.com/babel/babel-eslint [4]: https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser [5]: https://github.com/arcticicestudio/styleguide-javascript/tree/main/packages/%40arcticicestudio/eslint-config-base [6]: https://github.com/arcticicestudio/styleguide-javascript/releases/tag/v0.11.0 [7]: https://semver.npmjs.com [8]: https://github.com/azeemba/eslint-plugin-json [9]: https://github.com/ota-meshi/eslint-plugin-jsonc [10]: https://komkom.github.io [11]: https://github.com/sindresorhus/del-cli/releases/tag/v1.1.0 [12]: https://github.com/sindresorhus/del-cli/releases/tag/v4.0.1 [13]: https://github.com/sindresorhus/del-cli [14]: https://eslint.org [15]: https://github.com/eslint/eslint/releases/tag/v5.16.0 [16]: https://github.com/eslint/eslint/releases/tag/v7.32.0 [17]: https://github.com/import-js/eslint-plugin-import [18]: https://github.com/import-js/eslint-plugin-import/releases/tag/v2.17.3 [19]: https://github.com/import-js/eslint-plugin-import/releases/tag/v2.24.2 [20]: https://github.com/prettier/eslint-plugin-prettier [21]: https://github.com/prettier/eslint-plugin-prettier/releases/tag/v3.1.0 [22]: https://github.com/prettier/eslint-plugin-prettier/releases/tag/v4.0.0 [23]: https://prettier.io [24]: https://github.com/prettier/prettier/releases/tag/2.4.1 [25]: https://github.com/prettier/prettier/releases/tag/2.4.1 [26]: https://remark.js.org [27]: https://github.com/remarkjs/remark/releases/tag/remark-cli%406.0.1 [28]: https://github.com/remarkjs/remark/releases/tag/remark-cli%409.0.0 [29]: https://www.npmjs.com/package/remark-preset-lint-arcticicestudio [30]: https://github.com/arcticicestudio/styleguide-markdown/tree/main/packages/%40arcticicestudio/remark-preset-lint [31]: https://github.com/microsoft/vscode-vsce [32]: https://github.com/microsoft/vscode-vsce/releases/tag/v1.62.0 [33]: https://github.com/microsoft/vscode-vsce/releases/tag/v1.100.0 Co-authrored-by: Sven Greb <development@svengreb.de> Closes GH-233
1 parent 98842da commit caf5083

17 files changed

Lines changed: 10161 additions & 4239 deletions

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# +--------------------+
99
# + Base Configuration +
1010
# +--------------------+
11+
root = true
12+
1113
[*]
1214
charset = utf-8
1315
end_of_line = lf
@@ -22,4 +24,5 @@ trim_trailing_whitespace = true
2224
# +-----------+
2325
# +--- Markdown ---+
2426
[*.{md}]
27+
max_line_length = off
2528
trim_trailing_whitespace = false

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.github/*
1010
.vscode/*
1111
assets/*
12-
**/node_modules/*
12+
node_modules/*
1313
*.vsix
1414
!lint-staged.config.js
1515
!.eslintrc.js

.eslintrc.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,20 @@
88
*/
99

1010
/**
11-
* @file The ESLint configuration.
12-
* @author Arctic Ice Studio <development@arcticicestudio.com>
13-
* @author Sven Greb <development@svengreb.de>
14-
* @see https://github.com/babel/eslint-plugin-babel#rules
15-
* @see https://github.com/tc39/proposal-optional-chaining
16-
* @see https://eslint.org/docs/user-guide/configuring#specifying-environments
11+
* Configurations for ESLint.
12+
*
13+
* @see https://eslint.org/docs/user-guide/configuring
1714
*/
18-
1915
module.exports = {
20-
extends: "arcticicestudio-base",
21-
plugins: ["json", "prettier"],
22-
parser: "babel-eslint",
23-
env: {
24-
node: true,
25-
browser: true
26-
},
27-
rules: {
28-
/* Prioritize format errors found by Prettier. */
29-
"prettier/prettier": "error"
30-
}
16+
extends: [
17+
"plugin:jsonc/recommended-with-jsonc",
18+
"@arcticicestudio/eslint-config-base",
19+
/*
20+
* Enable support for projects using Prettier.
21+
* Note that this must always be placed after the `@arcticicestudio/eslint-config-base` preset to take precedence,
22+
* otherwise it won't prevent errors due to useless and possibly conflicting rules!
23+
*/
24+
"@arcticicestudio/eslint-config-base/prettier",
25+
],
26+
plugins: ["jsonc"],
3127
};

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Automatically perform line feed (LF) normalization for files detected as text and leave all files detected as binary
1212
# untouched.
13-
* text=auto
13+
* text=auto eol=lf
1414

1515
# +--------+
1616
# + Assets +

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,10 @@
55
# Repository: https://github.com/arcticicestudio/nord-visual-studio-code
66
# License: MIT
77

8-
# +------+
9-
# + Logs +
10-
# +------+
11-
logs/
12-
**/*.log
13-
npm-debug.log*
14-
158
# +---------+
169
# + Node.js +
1710
# +---------+
1811
**/node_modules/
19-
.npm/
2012

2113
# +--------------------+
2214
# + Visual Studio Code +

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
# Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
4+
# Copyright (C) 2017-present Sven Greb <development@svengreb.de>
5+
#
6+
# Project: Nord Visual Studio Code
7+
# Repository: https://github.com/arcticicestudio/nord-visual-studio-code
8+
# License: MIT
9+
10+
# Git "pre-commit" hook for husky.
11+
#
12+
# References:
13+
# 1. https://github.com/typicode/husky
14+
# 2. https://git-scm.com/docs/githooks#_pre_commit
15+
16+
. "$(dirname "$0")/_/husky.sh"
17+
18+
npm exec lint-staged

.huskyrc.js

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

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# License: MIT
77

88
package-lock=true
9-
save-exact=true
9+
save-exact=false

.prettierignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
# License: MIT
77

88
assets/*
9-
**/node_modules/*
10-
package-lock.json
9+
node_modules/*
1110
*.vsix

0 commit comments

Comments
 (0)