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

feat!: eslint v9, typescript-eslint v8, inline airbnb config #129

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc.js

This file was deleted.

42 changes: 0 additions & 42 deletions .eslintrc.react.js

This file was deleted.

3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ updates:
- dependency-name: "@types/node"
update-types:
- "version-update:semver-major"
- dependency-name: eslint
update-types:
- "version-update:semver-major"
commit-message:
# since a deps update is significant for this package,
# don't use chore for non-dev updates
Expand Down
4 changes: 0 additions & 4 deletions .prettierrc.js

This file was deleted.

43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Shared ECMAScript Config (TS, Lint, Prettier)
1. Install

```sh
yarn add -D @nihalgonsalves/esconfig typescript eslint prettier
yarn add -D @nihalgonsalves/esconfig typescript typescript-eslint eslint prettier
```

2. `tsconfig.json`

```json
{
"extends": "@nihalgonsalves/esconfig",
"extends": "@nihalgonsalves/esconfig/tsconfig.shared.json",
"compilerOptions": {
"outDir": "./build",
"rootDir": "./src"
Expand All @@ -23,32 +23,35 @@ Shared ECMAScript Config (TS, Lint, Prettier)
}
```

3. `.eslintrc`
3. `eslint.config.mjs`

```json
{
"extends": "./node_modules/@nihalgonsalves/esconfig/.eslintrc"
}
```js
import tseslint from "typescript-eslint";

import sharedConfig from "@nihalgonsalves/esconfig/eslint.config.shared";

export default tseslint.config([
{ ignores: [] },
...sharedConfig,
// ... others
]);
```

If you're using React:

```json
{
"extends": [
"./node_modules/@nihalgonsalves/esconfig/.eslintrc",
"./node_modules/@nihalgonsalves/esconfig/.eslintrc.react"
]
}
```
```js
import tseslint from "typescript-eslint";

4. `.prettierrc`
import sharedConfig from "@nihalgonsalves/esconfig/eslint.config.react-shared";

```json
"@nihalgonsalves/esconfig/.prettierrc"
export default tseslint.config([
{ ignores: [] },
...sharedConfig,
// ... others
]);
```

5. `package.json`
4. `package.json`

```json
{
Expand All @@ -61,4 +64,4 @@ Shared ECMAScript Config (TS, Lint, Prettier)
}
```

6. Done! Don't forget to run `build`, `lint` and `format:check` in your CI workflow.
5. Done! Don't forget to run `build`, `lint` and `format:check` in your CI workflow.
71 changes: 0 additions & 71 deletions eslint-rules-base.js

This file was deleted.

10 changes: 10 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import sharedConfig from "./eslint.config.shared.js";

export default [
...sharedConfig,
{
rules: {
"import/extensions": "off",
},
},
];
Loading