Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade ESLint to v9 and overhaul configuration #1786

Merged
merged 20 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2c0c370
feat(eslint): upgrade to v9 and flat config
RubenSibon Dec 11, 2024
ead0b57
fix(eslint): address lint issues
RubenSibon Dec 11, 2024
baeb0a4
feat(eslint): remove lint:md task
RubenSibon Dec 11, 2024
860f605
feat(markdownlint): remove cli pkg and update docs
RubenSibon Dec 13, 2024
7759704
docs(contrib): vscode settings
RubenSibon Dec 13, 2024
4f7cf3d
Merge branch 'develop' of github.com:Amsterdam/design-system into fea…
RubenSibon Dec 13, 2024
3b65a3c
fix(teslint): enable linting ts
RubenSibon Dec 13, 2024
882866d
fix(teslint): address lint issues
RubenSibon Dec 13, 2024
b9e430b
Merge branch 'develop' of github.com:Amsterdam/design-system into fea…
RubenSibon Dec 13, 2024
40cb206
fix: address comments
RubenSibon Dec 13, 2024
df26972
Merge branches 'feat/DES-769-upgrade-eslint-to-v9' and 'develop' of g…
RubenSibon Dec 16, 2024
e2a225e
fix: remove ignore of node_modules
RubenSibon Dec 16, 2024
56d331f
refactor(eslint): sort rules alphabetically
RubenSibon Dec 16, 2024
f9be0f7
style(prettier): ignore prettier for code block
RubenSibon Dec 16, 2024
33729fb
style(prettier): ignore prettier for code block
RubenSibon Dec 16, 2024
2b24892
Merge branch 'feat/DES-769-upgrade-eslint-to-v9' of github.com:Amster…
RubenSibon Dec 16, 2024
cac160d
Merge branch 'feat/DES-769-upgrade-eslint-to-v9' of github.com:Amster…
RubenSibon Dec 16, 2024
c5b4c1a
Merge branch 'feat/DES-769-upgrade-eslint-to-v9' of github.com:Amster…
RubenSibon Dec 16, 2024
0abeacd
Merge branch 'feat/DES-769-upgrade-eslint-to-v9' of github.com:Amster…
RubenSibon Dec 16, 2024
6fabaa5
Merge branch 'feat/DES-769-upgrade-eslint-to-v9' of github.com:Amster…
RubenSibon Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

72 changes: 0 additions & 72 deletions .eslintrc.json

This file was deleted.

8 changes: 0 additions & 8 deletions .eslintrc.react.json

This file was deleted.

116 changes: 0 additions & 116 deletions .eslintrc.ts.json

This file was deleted.

3 changes: 1 addition & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"composer.json": "composer validate",
"package.json": "npmPkgJsonLint --allowEmptyTargets",
"*.md": ["markdownlint", "prettier --check"],
"*.{js,json,jsx,mdx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"],
"*.{md,js,json,jsx,mdx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"],
"*.{css,scss}": ["stylelint --allow-empty-input", "prettier --check"]
}
5 changes: 0 additions & 5 deletions .markdownlint.json

This file was deleted.

6 changes: 0 additions & 6 deletions .markdownlintignore

This file was deleted.

1 change: 1 addition & 0 deletions .ncurc.major.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
const minorConfig = require('./.ncurc.minor')

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions .ncurc.minor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
const patchConfig = require('./.ncurc.patch')

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions .ncurc.patch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
module.exports = {
reject: [],
}
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,25 @@ You can use any editor you like, but if you use [Visual Studio Code](https://cod

- [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
- [MDX](https://marketplace.visualstudio.com/items?itemName=silvenon.mdx)
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint)

To enable correct validation and to fix lint/style errors on save, add this to your VSCode `settings.json`:

```json
{
"eslint.useFlatConfig": true,
"css.validate": false,
"scss.validate": false,
"stylelint.validate": ["css", "scss"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true,
"source.fixAll.markdownlint": true
"source.fixAll.stylelint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnSave": true
}
```

</details>
Expand Down Expand Up @@ -196,7 +197,7 @@ The copyright holder for all files created by people working for the City of Ams
If you use code from other EUPL-1.2 or higher licensed files that have a copyright notice, don’t forget to add this copyright notice as well.
So, for a file with code written by someone working for the City of Amsterdam in 2023, but also containing code from another EUPL-1.2 or higher licensed file written by John Doe in 2021, the header would look like this:

```javascript
```ts
/**
* @license EUPL-1.2+
* Copyright (c) 2021 John Doe
Expand All @@ -208,7 +209,7 @@ All documentation files should also start with a license header.
We use the Creative Commons Zero (CC0) license for this.
The license header looks like this:

```md
```html
<!-- @license CC0-1.0 -->
```

Expand Down
2 changes: 1 addition & 1 deletion documentation/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ For example, when the child is a simple string (like in the default Button compo

To do this, you can override the default like so:

```js
```txt
argTypes: {
children: {
table: { disable: false },
Expand Down
Loading
Loading