Skip to content

Commit d6f352f

Browse files
Merge pull request #54 from iambumblehead/update-eslint
update eslint to version 9
2 parents 1885639 + 73c84f6 commit d6f352f

File tree

8 files changed

+88
-93
lines changed

8 files changed

+88
-93
lines changed

.eslintrc.json

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

.github/workflows/lint.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
build:
10+
lint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- name: lint
15-
uses: actions/setup-node@v3
13+
- uses: actions/checkout@v4
1614
with:
17-
node-version: '20.x'
15+
node-version: 22
1816
- run: npm install
1917
- run: npm run lint

.github/workflows/publish.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
11+
- uses: actions/checkout@v4
1312
with:
14-
node-version: 20
13+
node-version: 22
1514
- run: npm install
16-
- run: npm run build --if-present
1715
- run: npm run test
1816

1917
# publish-npm:
@@ -34,10 +32,10 @@ jobs:
3432
needs: build
3533
runs-on: ubuntu-latest
3634
steps:
37-
- uses: actions/checkout@v2
38-
- uses: actions/setup-node@v2
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-node@v4
3937
with:
40-
node-version: 16
38+
node-version: 20
4139
registry-url: https://npm.pkg.github.com/
4240
- name: Insert repository owner as scope into package name
4341
run: |

.github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: tests
1+
name: test
22

33
on:
44
push:
@@ -10,11 +10,8 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- name: Use Node.js ${{ matrix.node-version }}
15-
uses: actions/setup-node@v3
13+
- uses: actions/checkout@v4
1614
with:
17-
node-version: 20
15+
node-version: 22
1816
- run: npm install
19-
- run: npm run build --if-present
2017
- run: npm test

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 6.1.5 - 2024-04-29
4+
5+
* [update eslint to version 9](https://github.com/iambumblehead/form-urlencoded/pull/54)
6+
37
## 6.1.4 - 2023-09-24
48

59
* [switch primary branch to 'main'](https://github.com/iambumblehead/form-urlencoded/pull/53)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ form-urlencoded
22
===============
33
**(c)[Bumblehead][0], [JBlashill][6]**
44

5-
[![npm version](https://badge.fury.io/js/form-urlencoded.svg)](https://badge.fury.io/js/form-urlencoded) [![Build Status](https://github.com/iambumblehead/form-urlencoded/workflows/nodejs-ci/badge.svg)][2]
5+
[![npm version](https://badge.fury.io/js/form-urlencoded.svg)](https://badge.fury.io/js/form-urlencoded) [![Build Status](https://github.com/iambumblehead/form-urlencoded/workflows/test/badge.svg)][2]
66

77
Returns 'x-www-form-urlencoded' string data, an encoding often used when an [HTML form is submitted][1]. Form data is serialised in [this format][2] and sent to a server.
88

eslint.config.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
const js = require('@eslint/js')
2+
3+
module.exports = [
4+
js.configs.recommended,
5+
{
6+
ignores: [],
7+
languageOptions: {
8+
ecmaVersion: 2022,
9+
sourceType: "module",
10+
globals: {
11+
Set: true,
12+
console: true
13+
}
14+
},
15+
rules: {
16+
"global-require": 0,
17+
"no-sequences": 0,
18+
"semi": [2, "never"],
19+
"strict": [2, "never"],
20+
"one-var": [2, {
21+
"let": "always",
22+
"const": "never"
23+
}],
24+
"space-in-parens": [2, "never" ],
25+
"indent": [2, 2, {
26+
"flatTernaryExpressions": true,
27+
"VariableDeclarator": {
28+
"let": 2,
29+
"const": 3
30+
}
31+
}],
32+
"camelcase": [2, {"properties": "never"}],
33+
"func-names": [2, "never"],
34+
"newline-per-chained-call": 0,
35+
"max-len": [2, 80],
36+
"comma-dangle": [2, "never"],
37+
"prefer-template": 0,
38+
"no-use-before-define": 0,
39+
"no-mixed-operators": 0,
40+
"no-plusplus": 0,
41+
"no-console": 0,
42+
"object-curly-newline": 0,
43+
"nonblock-statement-body-position": 0,
44+
"arrow-parens": [2, "as-needed"],
45+
"space-before-function-paren": [2, "always"],
46+
"function-paren-newline": 0,
47+
"consistent-return": 0,
48+
"array-callback-return": 0,
49+
"prefer-const": 0,
50+
"curly": 0,
51+
"operator-linebreak": 0,
52+
"no-param-reassign": 0,
53+
"key-spacing": [2, {"beforeColon": true}],
54+
"implicit-arrow-linebreak": 0,
55+
"no-shadow": [0, "warn", {
56+
"allow": [ "err" ]
57+
}
58+
],
59+
"prefer-arrow-callback": [2, {
60+
"allowNamedFunctions": true
61+
}],
62+
"no-return-assign": 0,
63+
"no-nested-ternary": 0,
64+
"array-bracket-spacing": [2, "always"],
65+
"prefer-destructuring": 2,
66+
"class-methods-use-this": 0,
67+
"no-confusing-arrow": 0
68+
}
69+
}
70+
]

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"require": "./form-urlencoded.js",
1010
"import": "./form-urlencoded.mjs"
1111
},
12-
"version": "6.1.4",
12+
"version": "6.1.5",
1313
"description": "Return an object as an 'x-www-form-urlencoded' string",
1414
"author": "Chris <[email protected]>",
1515
"license": "MIT",
@@ -48,7 +48,7 @@
4848
"json encode"
4949
],
5050
"devDependencies": {
51-
"eslint": "^7.26.0"
51+
"eslint": "^9.1.1"
5252
},
5353
"scripts": {
5454
"test": "npm start && node --test form-urlencoded.spec.mjs",

0 commit comments

Comments
 (0)