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

Upgrade to ESLint 9 #20

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
feat: Upgrade to eslint 9, dropping unsupported packages along the way
BREAKING CHANGE: The minimum ESLint version is now >=9
  • Loading branch information
joncursi committed Sep 26, 2024
commit 933d39658fc5aa28e7a2d650ab30a744e048d037
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion .eslintrc.js

This file was deleted.

4 changes: 3 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module.exports = require('./src/prettier.config');
import baseConfig from './src/prettier.config.js';

export default baseConfig;
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,28 @@ commit:

## Configure ESLint

To configure [ESLint](https://eslint.org/), add the following to your
`package.json` file. This will allow ESLint to discover the configuration this
repository provides from within your `node_modules` folder, and will check
your `*.js`, `*.ts`, and `*.tsx` files for infractions every time you create a
new commit:
To configure [ESLint](https://eslint.org/), import our flat config and add it
to your `eslint.config.js` file:

```js
import baseConfig from '@actinc/eslint-config';

export default [
...baseConfig,
{
// Your project customizations go here.
},
];
```

To check your `.js(x)` and `.ts(x)` files for infractions every time you create
a new commit, you can add the following to your `package.json` file:

```json
...
"eslintConfig": {
...
"extends": [
...
"@actinc/eslint-config",
...
],
...
},
...
"lint-staged": {
...
"*.{js,ts,tsx}": "eslint",
"*.{js,jsx,ts,tsx}": "npx eslint",
...
},
...
Expand Down
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import baseConfig from './src/index.js';

export default [
...baseConfig,
{
ignores: ['dist'],
},
];
Loading