Skip to content

Commit 34792f4

Browse files
authored
Feat review eslint (#291)
* refactor(eslint): simplify ESLint configuration and remove unused plugins * chore(deps): update dependencies for @fastify/multipart, aws-serverless-fastify, eslint, and fastify * refactor(eslint): remove unused language options from ESLint configuration
1 parent 396226c commit 34792f4

File tree

2 files changed

+18
-38
lines changed

2 files changed

+18
-38
lines changed

eslint.config.mjs

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,16 @@
1-
import path from 'node:path'
2-
import { fileURLToPath } from 'node:url'
31
import js from '@eslint/js'
4-
import { FlatCompat } from '@eslint/eslintrc'
2+
import { defineConfig } from 'eslint/config'
3+
import neostandard from 'neostandard'
54

6-
const __filename = fileURLToPath(import.meta.url)
7-
const __dirname = path.dirname(__filename)
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
recommendedConfig: js.configs.recommended,
11-
allConfig: js.configs.all
12-
})
13-
14-
export default [{
15-
ignores: ['node_modules']
16-
}, ...compat.extends('standard'), {
17-
languageOptions: {
18-
globals: {
19-
describe: false,
20-
it: false,
21-
before: false,
22-
after: false,
23-
beforeEach: false,
24-
afterEach: false
5+
export default defineConfig([
6+
js.configs.recommended,
7+
neostandard({
8+
ignores: neostandard.resolveIgnoresFromGitignore()
9+
}),
10+
{
11+
rules: {
12+
'array-bracket-spacing': 0,
13+
'dot-notation': 0
2514
}
26-
},
27-
28-
rules: {
29-
'array-bracket-spacing': 0,
30-
'dot-notation': 0
31-
}
32-
}]
15+
}]
16+
)

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,17 @@
4242
"devDependencies": {
4343
"@eslint/eslintrc": "3.3.3",
4444
"@eslint/js": "9.39.2",
45-
"@fastify/multipart": "^9.0.2",
45+
"@fastify/multipart": "^9.3.0",
4646
"@h4ad/serverless-adapter": "4.4.0",
4747
"@types/aws-lambda": "8.10.159",
4848
"@types/node": "^25.0.3",
4949
"aws-serverless-express": "^3.4.0",
50-
"aws-serverless-fastify": "^3.1.0",
50+
"aws-serverless-fastify": "^3.1.3",
5151
"benchmark": "^2.1.4",
52-
"eslint": "^9.18.0",
53-
"eslint-config-standard": "^17.1.0",
54-
"eslint-plugin-import": "^2.31.0",
55-
"eslint-plugin-n": "^17.15.1",
56-
"eslint-plugin-promise": "^7.2.1",
57-
"eslint-plugin-standard": "^5.0.0",
52+
"eslint": "^9.39.2",
5853
"fast-glob": "^3.3.3",
59-
"fastify": "^5.2.1",
54+
"fastify": "^5.6.2",
55+
"neostandard": "^0.12.2",
6056
"serverless-http": "^4.0.0",
6157
"tsd": "^0.33.0"
6258
},

0 commit comments

Comments
 (0)