Skip to content

Commit

Permalink
Migration to flat ESLint config, Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeAspy committed May 16, 2024
1 parent 982229f commit 8706e18
Show file tree
Hide file tree
Showing 11 changed files with 1,214 additions and 1,060 deletions.
36 changes: 0 additions & 36 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'weekly'
interval: 'monthly'
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
node-version: latest

- uses: pnpm/action-setup@v2
with:
Expand Down
25 changes: 25 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
{ignores:["dist/"]},
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{

languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules:{
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/prefer-for-of": "off"
}
},
);
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
"type": "module",
"scripts": {
"start": "node dist/src/index.js",
"lint": "eslint src -c .eslintrc.json **/*.ts",
"lint": "eslint \"**/*.ts\" .",
"dev": "tsx src/index.ts",
"build": "tsc"
},
"dependencies": {
"fastify": "^4.26.2"
"@eslint/js": "^9.2.0",
"@types/eslint__js": "^8.42.3",
"fastify": "^4.27.0",
"typescript-eslint": "^7.9.0"
},
"devDependencies": {
"@types/node": "^20.11.30",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"eslint": "^8.57.0",
"typescript": "5.4.3"
"@types/node": "^20.12.12",
"eslint": "^9.2.0",
"typescript": "5.4.5"
},
"optionalDependencies": {
"tsx": "^4.7.1"
"tsx": "^4.10.3"
}
}
Loading

0 comments on commit 8706e18

Please sign in to comment.