Skip to content

Commit

Permalink
feat: enable eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
LastLeaf committed Dec 5, 2024
1 parent 7c1337b commit 7477204
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 45 deletions.
35 changes: 0 additions & 35 deletions .eslintrc.js

This file was deleted.

16 changes: 16 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const js = require('@eslint/js')
const tseslint = require('typescript-eslint')
const importPlugin = require('eslint-plugin-import')
const prettierRecommended = require('eslint-plugin-prettier/recommended')
const promise = require('eslint-plugin-promise')

module.exports = tseslint.config({
files: ["src/**/*.[jt]s", "dist/**/*.[jt]s"],
extends: [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
promise.configs['flat/recommended'],
prettierRecommended,
tseslint.configs.recommended,
],
})
45 changes: 40 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@
"test": "jest"
},
"devDependencies": {
"@eslint/js": "^10.0.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.1",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
Expand All @@ -46,6 +45,7 @@
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.17.0",
"webpack-cli": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const hello = (a: number, b: number) => {
return a + b;
return a + b
}
2 changes: 0 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */

const path = require('path')

module.exports = [
Expand Down

0 comments on commit 7477204

Please sign in to comment.