Skip to content

Commit c48cff2

Browse files
Relace standardjs with neostandard for linting (#96)
1 parent bb5a6ce commit c48cff2

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

docs/standards/javascript_standards.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,29 @@
22

33
Use vanilla JavaScript, don't use extensions to the language such as TypeScript
44

5-
### Use [Standard JS](https://standardjs.com/) to lint your code
5+
### Use [neostandard](https://github.com/neostandard/neostandard) to lint your code
6+
7+
neostandard is an opinionated JavaScript linter that enforces a consistent coding style.
68

79
- A consistent approach to code layout, spacing and formatting makes it easier to switch between projects.
810

9-
By [adding it as a dev dependency](https://standardjs.com/index.html#install) it can be easily used in the terminal,
10-
[Webstorm](https://blog.jetbrains.com/webstorm/2017/04/using-javascript-standard-style/),
11-
and [Visual Studio](https://marketplace.visualstudio.com/items?itemName=chenxsan.vscode-standardjs).
11+
- By adding it as a dev dependency it can be easily used in the terminal and CI pipelines.
12+
13+
- The choice of an opinionated linter is deliberate as it avoids teams needing to spend time debating the merits of different styles.
14+
15+
- Teams should not extend or modify the neostandard ruleset
16+
17+
- Teams should not set the `noStyle` rule to `true` to disable the linter's formatting rules
18+
19+
#### [Standard JS](https://standardjs.com/)
20+
21+
Standard JS was previously Defra's choice of linter, however this is no longer maintained as it once was.
22+
23+
neostandard is the spiritual successor to Standard JS and is maintained by many of the same people.
24+
25+
Whilst there is no immediate requirement that teams migrate existing codebases to neostandard, new projects should use neostandard.
26+
27+
Migration is relatively straightforward and neostandard [documentation](https://github.com/neostandard/neostandard?tab=readme-ov-file#migrate-from-standard) includes a guide.
1228

1329
### Do not use front end JavaScript frameworks
1430

@@ -24,4 +40,5 @@ This standard was formally adopted on 1 July 2019.
2440

2541
## Significant changes
2642

27-
Clarification on not using front end frameworks was added 1 December 2024.
43+
- Clarification on not using front end frameworks was added 1 December 2024.
44+
- Standard JS was replaced with neostandard 24 April 2025

0 commit comments

Comments
 (0)