Skip to content

Commit

Permalink
feat: eslint 9 migration
Browse files Browse the repository at this point in the history
BREAKING CHANGE: eslint 9 is now require
BREAKING CHANGE: typescript >= v4.7 is now required (when using typescript)
  • Loading branch information
RebeccaStevens committed Jun 19, 2024
1 parent 7dbb41b commit dfb21a4
Show file tree
Hide file tree
Showing 81 changed files with 7,637 additions and 6,574 deletions.
146 changes: 0 additions & 146 deletions .eslintrc.json

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/lint-prettier.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
uses: ./.github/workflows/lint-markdown.yml
lint_packages:
uses: ./.github/workflows/lint-packages.yml
lint_prettier:
uses: ./.github/workflows/lint-prettier.yml
lint_spelling:
uses: ./.github/workflows/lint-spelling.yml
test:
Expand All @@ -46,7 +44,6 @@ jobs:
- lint_markdown
- lint_spelling
- lint_packages
- lint_prettier
- test
- type_check
runs-on: ubuntu-latest
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ jobs:
os:
- "ubuntu-latest"
node_version:
- "16"
- "18"
- "18.18"
- "20"
- "latest"
ts_version:
- "next"
- "latest"
- "4.3.5"
- "4.7.4"
# - "JS"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.ts_version == 'next' }}
Expand Down
11 changes: 5 additions & 6 deletions .lintstagedrc.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
"*.{json,yml}":
- prettier --ignore-unknown --write
- eslint --fix
- cspell lint --no-progress --show-suggestions --show-context --no-must-find-files --dot

"*.ts":
- prettier --ignore-unknown --write
"*.?([cm])[jt]s?(x)":
- eslint --fix
- cspell lint --no-progress --show-suggestions --show-context --no-must-find-files --dot
- tsc-files -p tsconfig.build.json --noEmit

"*.md":
- prettier --ignore-unknown --write
- markdownlint --config=.markdownlint.json --ignore-path=.markdownlintignore
- markdownlint-cli2 --fix
- eslint --fix
- cspell lint --no-progress --show-suggestions --show-context --no-must-find-files --dot

"pnpm-lock.yaml":
pnpm-lock.yaml:
- "pnpm dedupe && :"
6 changes: 6 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "node_modules/markdownlint-cli2/schema/markdownlint-cli2-config-schema.json",
"gitignore": true,
"globs": ["**/*.md"],
"ignores": ["node_modules", "coverage", "lib", "CHANGELOG.md"],
}
6 changes: 4 additions & 2 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"$schema": "node_modules/markdownlint-cli2/schema/markdownlint-config-schema.json",

"default": false,
"extends": "markdownlint/style/prettier",

Expand Down Expand Up @@ -62,9 +64,9 @@
// MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md013.md
"MD013": {
// Number of characters
"line_length": 160,
"line_length": 120,
// Number of characters for headings
"heading_line_length": 160,
"heading_line_length": 120,
// Number of characters for code blocks
"code_block_line_length": 120,
// Include code blocks
Expand Down
3 changes: 0 additions & 3 deletions .markdownlintignore

This file was deleted.

1 change: 0 additions & 1 deletion .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

plugins:
- prettier-plugin-packagejson
- prettier-plugin-multiline-arrays

trailingComma: "all"

Expand Down
23 changes: 16 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit",
"source.formatDocument": "explicit",
"source.organizeImports": "explicit",
"source.sortImports": "explicit"
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.formatOnSave": false,
"editor.rulers": [80],
"eslint.probe": [
"html",
"javascript",
"javascriptreact",
"json",
"jsonc",
"markdown",
"toml",
"typescript",
"typescriptreact",
"vue",
"yaml"
],
"files.associations": {
".markdownlint.json": "jsonc",
".markdownlintignore": "ignore"
Expand All @@ -29,6 +38,6 @@
},
"typescript.tsdk": "./node_modules/typescript/lib",
"[markdown]": {
"editor.rulers": [160]
"editor.rulers": [120]
}
}
16 changes: 12 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ For new features file an issue. For bugs, file an issue and optionally file a PR

To execute the tests run `pnpm test`.

To learn about ESLint plugin development see the [relevant section](https://eslint.org/docs/developer-guide/working-with-plugins) of the ESLint docs. You can also checkout the [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) repo which has some more information specific to TypeScript.
To learn about ESLint plugin development see the
[relevant section](https://eslint.org/docs/developer-guide/working-with-plugins) of the ESLint docs.
You can also checkout the [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) repo which has
some more information specific to TypeScript.

In order to know which AST nodes are created for a snippet of TypeScript code you can use [AST explorer](https://astexplorer.net/) with options JavaScript and @typescript-eslint/parser.
In order to know which AST nodes are created for a snippet of TypeScript code you can use
[AST explorer](https://astexplorer.net/) with options JavaScript and @typescript-eslint/parser.

### Commit Messages

> tl;dr: use `npx cz` instead of `git commit`.
Commit messages must follow [Conventional Commit messages guidelines](https://www.conventionalcommits.org/en/v1.0.0/). You can use `npx cz` instead of `git commit` to run an interactive prompt to generate the commit message. We've customize the prompt specifically for this project. For more information see [commitizen](https://github.com/commitizen/cz-cli#readme).
Commit messages must follow [Conventional Commit messages guidelines](https://www.conventionalcommits.org/en/v1.0.0/).
You can use `npx cz` instead of `git commit` to run an interactive prompt to generate the commit message. We've
customize the prompt specifically for this project. For more information see
[commitizen](https://github.com/commitizen/cz-cli#readme).

### How to publish

Publishing is handled by [semantic release](https://github.com/semantic-release/semantic-release#readme) - there shouldn't be any need to publish manually.
Publishing is handled by [semantic release](https://github.com/semantic-release/semantic-release#readme) -
there shouldn't be any need to publish manually.
18 changes: 14 additions & 4 deletions DONATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Any donations would be much appreciated. 😄

## Enterprise Users

`eslint-plugin-functional` is available as part of the [Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-eslint-plugin-functional).
`eslint-plugin-functional` is available as part of the
[Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-eslint-plugin-functional).

## Real money

Expand All @@ -13,23 +14,32 @@ Any donations would be much appreciated. 😄
## Cryptocurrencies

<details>
<summary><img src="https://raw.githubusercontent.com/get-icon/geticon/master/icons/bitcoin.svg" height="16" alt="Bitcoin Logo"> Bitcoin</summary>
<summary>
<img src="https://raw.githubusercontent.com/get-icon/geticon/master/icons/bitcoin.svg" height="16" alt="Bitcoin Logo">
Bitcoin
</summary>

![bitcoin address QR code](https://raw.githubusercontent.com/RebeccaStevens/RebeccaStevens/main/assets/cryptocurrencies/wallets/bitcoin.png)\
bc1qgr2xwvkpztsaq9kplud84r3dfz4g3e7d5c5lxm

</details>

<details>
<summary><img src="https://raw.githubusercontent.com/get-icon/geticon/master/icons/ethereum.svg" height="16" alt="Ethereum Logo"> Ethereum</summary>
<summary>
<img src="https://raw.githubusercontent.com/get-icon/geticon/master/icons/ethereum.svg" height="16" alt="Ethereum Logo">
Ethereum
</summary>

![ethereum address QR code](https://raw.githubusercontent.com/RebeccaStevens/RebeccaStevens/main/assets/cryptocurrencies/wallets/ethereum.png)\
0x643769d1DD2Cb912656dAA27C1b97e5A81EF9fd2

</details>

<details>
<summary><img src="https://raw.githubusercontent.com/RebeccaStevens/RebeccaStevens/main/assets/cryptocurrencies/logos/ltc.svg" height="16" alt="Litecoin Logo"> Litecoin</summary>
<summary>
<img src="https://raw.githubusercontent.com/RebeccaStevens/RebeccaStevens/main/assets/cryptocurrencies/logos/ltc.svg" height="16" alt="Litecoin Logo"> <!-- markdownlint-disable-line MD013 -->
Litecoin
</summary>

![litecoin address QR code](https://raw.githubusercontent.com/RebeccaStevens/RebeccaStevens/main/assets/cryptocurrencies/wallets/litecoin.png)\
ltc1qxr7p6z4hrh87g9mjjk67chyduwrh2nfrpxksjv
Expand Down
Loading

0 comments on commit dfb21a4

Please sign in to comment.