Skip to content

Commit e66a9ca

Browse files
authored
update packaging for eslint v9
1 parent 8f52a28 commit e66a9ca

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/handbook/development/packaging.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,28 @@ All Git Repositories must contain the following files:
3333

3434
### Linting
3535

36-
All code repositories should adopt our standard linting rules by copying the
37-
`.eslintrc` from the [FlowFuse/.github repository](https://github.com/FlowFuse/.github/blob/main/.eslintrc).
36+
All code repositories should be using ESLint V9 or greater and adopt our standard linting rules by copying
37+
`eslint.config.mjs` from the [FlowFuse/.github repository](https://github.com/FlowFuse/.github/blob/main/eslint.config.mjs).
3838

3939
If a repository has any additional requirements for linting, such as handling Vue
4040
code, then additional plugins can be added.
4141

42-
We use [StandardJS](https://standardjs.com/), with one exception - 4 spaces not 2.
42+
We stick closely to the [StandardJS](https://standardjs.com/), with one exception - 4 spaces not 2.
43+
44+
#### Scripts for linting in package.json
45+
46+
We add 2 common scripts for linting:
47+
1. `lint`
48+
2. `lint:fix`
49+
50+
Below is a typical example:
51+
```json
52+
"scripts": {
53+
// ...other scripts...
54+
"lint": "eslint -c eslint.config.mjs",
55+
"lint:fix": "eslint -c eslint.config.mjs --fix"
56+
},
57+
```
4358

4459
### Notifications
4560

0 commit comments

Comments
 (0)