@hs-web-team/eslint-config-node 0.3.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +4 -4
- package/.github/workflows/pr.yml +4 -4
- package/.github/workflows/release.yml +4 -4
- package/.nvmrc +1 -0
- package/.prettierrc.json +11 -0
- package/index.js +12 -7
- package/package.json +4 -3
|
@@ -2,7 +2,7 @@ name: Merge to Main
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches: [
|
|
5
|
+
branches: [main]
|
|
6
6
|
workflow_dispatch:
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
@@ -11,13 +11,13 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node: [
|
|
14
|
+
node: [20, 22]
|
|
15
15
|
|
|
16
16
|
name: Node ${{ matrix.node }} sample
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
19
|
- name: Run unit tests
|
|
20
|
-
uses: actions/setup-node@
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
21
|
with:
|
|
22
22
|
node-version: ${{ matrix.node }}
|
|
23
23
|
- run: npm install
|
package/.github/workflows/pr.yml
CHANGED
|
@@ -2,7 +2,7 @@ name: Pull Request
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
|
-
branches: [
|
|
5
|
+
branches: [main]
|
|
6
6
|
workflow_dispatch:
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
@@ -11,13 +11,13 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node: [
|
|
14
|
+
node: [20, 22]
|
|
15
15
|
|
|
16
16
|
name: Node ${{ matrix.node }} sample
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
19
|
- name: Run unit tests
|
|
20
|
-
uses: actions/setup-node@
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
21
|
with:
|
|
22
22
|
node-version: ${{ matrix.node }}
|
|
23
23
|
- run: npm install
|
|
@@ -7,12 +7,12 @@ jobs:
|
|
|
7
7
|
runs-on: ubuntu-latest
|
|
8
8
|
steps:
|
|
9
9
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
10
|
-
- uses: actions/checkout@
|
|
11
|
-
- uses: actions/setup-node@
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
- uses: actions/setup-node@v4
|
|
12
12
|
with:
|
|
13
|
-
node-version:
|
|
13
|
+
node-version: 22
|
|
14
14
|
registry-url: 'https://registry.npmjs.org'
|
|
15
15
|
- run: npm install
|
|
16
16
|
- run: npm publish
|
|
17
17
|
env:
|
|
18
|
-
NODE_AUTH_TOKEN:
|
|
18
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v22
|
package/.prettierrc.json
ADDED
package/index.js
CHANGED
|
@@ -4,18 +4,18 @@ module.exports = {
|
|
|
4
4
|
es2021: true,
|
|
5
5
|
node: true,
|
|
6
6
|
},
|
|
7
|
-
ignorePatterns: [
|
|
8
|
-
'/node_modules/',
|
|
9
|
-
'/.serverless/',
|
|
10
|
-
'/.eslintrc.js',
|
|
11
|
-
'/.webpack/',
|
|
12
|
-
],
|
|
7
|
+
ignorePatterns: ['/node_modules/', '/.serverless/', '/.eslintrc.js', '/.webpack/'],
|
|
13
8
|
extends: ['airbnb-base'],
|
|
14
9
|
parserOptions: {
|
|
15
10
|
ecmaVersion: 'latest',
|
|
16
11
|
},
|
|
17
12
|
rules: {
|
|
18
|
-
'no-console':
|
|
13
|
+
'no-console': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
allow: ['info', 'warn', 'error'],
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
19
|
camelcase: 0,
|
|
20
20
|
'comma-dangle': 1,
|
|
21
21
|
'arrow-parens': 0,
|
|
@@ -36,5 +36,10 @@ module.exports = {
|
|
|
36
36
|
],
|
|
37
37
|
'operator-linebreak': 0,
|
|
38
38
|
'implicit-arrow-linebreaks': 0,
|
|
39
|
+
'implicit-arrow-linebreak': 0,
|
|
40
|
+
'object-curly-newline': 0,
|
|
41
|
+
'newline-per-chained-call': 0,
|
|
42
|
+
indent: 0,
|
|
43
|
+
'function-paren-newline': 0,
|
|
39
44
|
},
|
|
40
45
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hs-web-team/eslint-config-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "HubSpot Marketing WebTeam ESLint rules for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
|
-
"node": ">=
|
|
11
|
+
"node": ">=22"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"eslint": "^8.55.0",
|
|
28
28
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
29
|
-
"eslint-plugin-import": "^2.29.0"
|
|
29
|
+
"eslint-plugin-import": "^2.29.0",
|
|
30
|
+
"prettier": "^3.5.3"
|
|
30
31
|
}
|
|
31
32
|
}
|