Skip to content

Commit

Permalink
Update eslint & typescript setup (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timahi authored Nov 23, 2024
1 parent 53ce4b7 commit a900ace
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ Feel free to explore the `tsconfig.json` file for all the configured options.

## ESLint and Prettier setup

The starter kit configures ESLint and Prettier. Both configurations are stored within the `package.json` file and use our [shared config](https://github.com/adonisjs/tooling-config/tree/main/packages). Feel free to change the configuration, use custom plugins, or remove both tools altogether.
The starter kit configures ESLint and Prettier
using our [shared config](https://github.com/adonisjs/tooling-config/tree/main/packages).
ESLint configuration is stored within the `eslint.config.js` file.
Prettier configuration is stored within the `package.json` file.
Feel free to change the configuration, use custom plugins, or remove both tools altogether.

## Using Stale bot

Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { configPkg } from '@adonisjs/eslint-config'

export default configPkg()
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"clean": "del-cli build",
"copy:templates": "copyfiles \"stubs/**/*.stub\" build",
"typecheck": "tsc --noEmit",
"lint": "eslint . --ext=.ts",
"lint": "eslint .",
"format": "prettier --write .",
"quick:test": "node --import=./tsnode.esm.js --enable-source-maps bin/test.ts",
"pretest": "npm run lint",
Expand All @@ -37,10 +37,10 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@adonisjs/assembler": "^7.7.0",
"@adonisjs/assembler": "^7.8.2",
"@adonisjs/core": "^6.12.0",
"@adonisjs/eslint-config": "^1.3.0",
"@adonisjs/prettier-config": "^1.3.0",
"@adonisjs/eslint-config": "2.0.0-beta.7",
"@adonisjs/prettier-config": "^1.4.0",
"@adonisjs/tsconfig": "^1.3.0",
"@japa/assert": "^3.0.0",
"@japa/runner": "^3.1.4",
Expand All @@ -49,10 +49,10 @@
"c8": "^10.1.2",
"copyfiles": "^2.4.1",
"del-cli": "^5.1.0",
"eslint": "^8.57.0",
"eslint": "^9.15.0",
"np": "^10.0.6",
"prettier": "^3.3.2",
"ts-node": "^10.9.2",
"ts-node-maintained": "^10.9.4",
"typescript": "^5.4.5"
},
"peerDependencies": {
Expand All @@ -77,8 +77,5 @@
"tests/**"
]
},
"eslintConfig": {
"extends": "@adonisjs/eslint-config/package"
},
"prettier": "@adonisjs/prettier-config"
}
3 changes: 1 addition & 2 deletions tsnode.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
| Because, loaders have been deprecated.
*/

import { register } from 'node:module'
register('ts-node/esm', import.meta.url)
import 'ts-node-maintained/register/esm'

0 comments on commit a900ace

Please sign in to comment.