Skip to content

Commit

Permalink
Merge pull request #54 from iambumblehead/update-eslint
Browse files Browse the repository at this point in the history
update eslint to version 9
  • Loading branch information
iambumblehead authored Apr 29, 2024
2 parents 1885639 + 73c84f6 commit d6f352f
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 93 deletions.
72 changes: 0 additions & 72 deletions .eslintrc.json

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ on:
branches: [ main ]

jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: lint
uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: '20.x'
node-version: 22
- run: npm install
- run: npm run lint
12 changes: 5 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: 20
node-version: 22
- run: npm install
- run: npm run build --if-present
- run: npm run test

# publish-npm:
Expand All @@ -34,10 +32,10 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://npm.pkg.github.com/
- name: Insert repository owner as scope into package name
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tests
name: test

on:
push:
Expand All @@ -10,11 +10,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: 20
node-version: 22
- run: npm install
- run: npm run build --if-present
- run: npm test
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 6.1.5 - 2024-04-29

* [update eslint to version 9](https://github.com/iambumblehead/form-urlencoded/pull/54)

## 6.1.4 - 2023-09-24

* [switch primary branch to 'main'](https://github.com/iambumblehead/form-urlencoded/pull/53)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ form-urlencoded
===============
**(c)[Bumblehead][0], [JBlashill][6]**

[![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]
[![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]

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.

Expand Down
70 changes: 70 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
const js = require('@eslint/js')

module.exports = [
js.configs.recommended,
{
ignores: [],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
Set: true,
console: true
}
},
rules: {
"global-require": 0,
"no-sequences": 0,
"semi": [2, "never"],
"strict": [2, "never"],
"one-var": [2, {
"let": "always",
"const": "never"
}],
"space-in-parens": [2, "never" ],
"indent": [2, 2, {
"flatTernaryExpressions": true,
"VariableDeclarator": {
"let": 2,
"const": 3
}
}],
"camelcase": [2, {"properties": "never"}],
"func-names": [2, "never"],
"newline-per-chained-call": 0,
"max-len": [2, 80],
"comma-dangle": [2, "never"],
"prefer-template": 0,
"no-use-before-define": 0,
"no-mixed-operators": 0,
"no-plusplus": 0,
"no-console": 0,
"object-curly-newline": 0,
"nonblock-statement-body-position": 0,
"arrow-parens": [2, "as-needed"],
"space-before-function-paren": [2, "always"],
"function-paren-newline": 0,
"consistent-return": 0,
"array-callback-return": 0,
"prefer-const": 0,
"curly": 0,
"operator-linebreak": 0,
"no-param-reassign": 0,
"key-spacing": [2, {"beforeColon": true}],
"implicit-arrow-linebreak": 0,
"no-shadow": [0, "warn", {
"allow": [ "err" ]
}
],
"prefer-arrow-callback": [2, {
"allowNamedFunctions": true
}],
"no-return-assign": 0,
"no-nested-ternary": 0,
"array-bracket-spacing": [2, "always"],
"prefer-destructuring": 2,
"class-methods-use-this": 0,
"no-confusing-arrow": 0
}
}
]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": "./form-urlencoded.js",
"import": "./form-urlencoded.mjs"
},
"version": "6.1.4",
"version": "6.1.5",
"description": "Return an object as an 'x-www-form-urlencoded' string",
"author": "Chris <chris@bumblehead.com>",
"license": "MIT",
Expand Down Expand Up @@ -48,7 +48,7 @@
"json encode"
],
"devDependencies": {
"eslint": "^7.26.0"
"eslint": "^9.1.1"
},
"scripts": {
"test": "npm start && node --test form-urlencoded.spec.mjs",
Expand Down

0 comments on commit d6f352f

Please sign in to comment.