Skip to content

Commit

Permalink
Merge pull request #27 from huuyafwww/feature/update_eslint_202501
Browse files Browse the repository at this point in the history
eslint.config.tsに対応 & ESLintのUpdate
  • Loading branch information
huuyafwww authored Jan 20, 2025
2 parents afd10a6 + 1e13e5f commit e587590
Show file tree
Hide file tree
Showing 15 changed files with 205 additions and 137 deletions.
10 changes: 10 additions & 0 deletions .changeset/hungry-lamps-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@huuyafwww/eslint-config-storybook": minor
"@huuyafwww/eslint-config-browser": minor
"@huuyafwww/eslint-config-common": minor
"@huuyafwww/eslint-config-react": minor
"@huuyafwww/eslint-config-next": minor
"@huuyafwww/eslint-config-node": minor
---

update ESLint. and add eslint.config.ts example document.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ However, legacy Config is not supported 😀

## Usage

### Require

|Name|Version|
|---|---|
|eslint|9.18.0|
|jiti|^2.4.2|

<details>

<summary>Node.js</summary>
Expand All @@ -36,21 +43,23 @@ However, legacy Config is not supported 😀
pnpm add -D @huuyafwww/eslint-config-common @huuyafwww/eslint-config-node @praha/eslint-config-definer
```

### eslint.config.js
### eslint.config.ts

```javascript
```typescript
import { common } from '@huuyafwww/eslint-config-common';
import { node } from '@huuyafwww/eslint-config-node';
import { define } from '@praha/eslint-config-definer';

import type { Linter } from 'eslint';

const config = define([
common,
node,
]);

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];

```

Expand All @@ -69,16 +78,18 @@ pnpm add -D @huuyafwww/eslint-config-common @huuyafwww/eslint-config-browser @hu
pnpm add -D @huuyafwww/eslint-config-storybook
```

### eslint.config.js
### eslint.config.ts

```javascript
```typescript
import { browser } from '@huuyafwww/eslint-config-browser';
import { common } from '@huuyafwww/eslint-config-common';
import { next } from '@huuyafwww/eslint-config-next';
import { react } from '@huuyafwww/eslint-config-react';
import { storybook } from '@huuyafwww/eslint-config-storybook';
import { define } from '@praha/eslint-config-definer';

import type { Linter } from 'eslint';

const config = define([
common,
browser,
Expand All @@ -89,7 +100,7 @@ const config = define([

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];
```

</details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { common } from '@huuyafwww/eslint-config-common';
import { node } from '@huuyafwww/eslint-config-node';
import { define } from '@praha/eslint-config-definer';

import type { Linter } from 'eslint';

const config = define([
common,
node,
]);

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];
6 changes: 4 additions & 2 deletions packages/eslint-config-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@
"@huuyafwww/eslint-config-common": "workspace:*",
"@huuyafwww/eslint-config-node": "workspace:*",
"@types/node": "^22.9.3",
"eslint": "9.14.0",
"eslint": "9.18.0",
"jiti": "^2.4.2",
"pkgroll": "^2.5.1",
"rimraf": "^6.0.1",
"sort-package-json": "^2.12.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"eslint": "9.14.0"
"eslint": "9.18.0",
"jiti": "^2.4.2"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { define } from '@praha/eslint-config-definer';
import { common } from './dist/index.mjs';
import { node } from '../eslint-config-node/dist/index.mjs';

import type { Linter } from 'eslint';

const config = define([
common,
node,
]);

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];
6 changes: 4 additions & 2 deletions packages/eslint-config-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@
},
"devDependencies": {
"@types/node": "^22.9.3",
"eslint": "9.14.0",
"eslint": "9.18.0",
"jiti": "^2.4.2",
"pkgroll": "^2.5.1",
"rimraf": "^6.0.1",
"sort-package-json": "^2.12.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"eslint": "9.14.0"
"eslint": "9.18.0",
"jiti": "^2.4.2"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { common } from '@huuyafwww/eslint-config-common';
import { node } from '@huuyafwww/eslint-config-node';
import { define } from '@praha/eslint-config-definer';

import type { Linter } from 'eslint';

const config = define([
common,
node,
]);

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];
6 changes: 4 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@
"@huuyafwww/eslint-config-common": "workspace:*",
"@huuyafwww/eslint-config-node": "workspace:*",
"@types/node": "^22.9.3",
"eslint": "9.14.0",
"eslint": "9.18.0",
"jiti": "^2.4.2",
"pkgroll": "^2.5.1",
"rimraf": "^6.0.1",
"sort-package-json": "^2.12.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"eslint": "9.14.0"
"eslint": "9.18.0",
"jiti": "^2.4.2"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { define } from '@praha/eslint-config-definer';

import { node } from './dist/index.mjs';

import type { Linter } from 'eslint';

const config = define([
common,
node,
]);

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];
6 changes: 4 additions & 2 deletions packages/eslint-config-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@
"devDependencies": {
"@huuyafwww/eslint-config-common": "workspace:*",
"@types/node": "^22.9.3",
"eslint": "9.14.0",
"eslint": "9.18.0",
"jiti": "^2.4.2",
"pkgroll": "^2.5.1",
"rimraf": "^6.0.1",
"sort-package-json": "^2.12.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"eslint": "9.14.0"
"eslint": "9.18.0",
"jiti": "^2.4.2"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { common } from '@huuyafwww/eslint-config-common';
import { node } from '@huuyafwww/eslint-config-node';
import { define } from '@praha/eslint-config-definer';

import type { Linter } from 'eslint';

const config = define([
common,
node,
]);

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];
6 changes: 4 additions & 2 deletions packages/eslint-config-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@
"@huuyafwww/eslint-config-common": "workspace:*",
"@huuyafwww/eslint-config-node": "workspace:*",
"@types/node": "^22.9.3",
"eslint": "9.14.0",
"eslint": "9.18.0",
"jiti": "^2.4.2",
"pkgroll": "^2.5.1",
"rimraf": "^6.0.1",
"sort-package-json": "^2.12.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"eslint": "9.14.0"
"eslint": "9.18.0",
"jiti": "^2.4.2"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { common } from '@huuyafwww/eslint-config-common';
import { node } from '@huuyafwww/eslint-config-node';
import { define } from '@praha/eslint-config-definer';

import type { Linter } from 'eslint';

const config = define([
common,
node,
]);

export default config({
tsconfigPath: './tsconfig.json',
});
}) satisfies Linter.Config[];
6 changes: 4 additions & 2 deletions packages/eslint-config-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@
"@huuyafwww/eslint-config-common": "workspace:*",
"@huuyafwww/eslint-config-node": "workspace:*",
"@types/node": "^22.9.3",
"eslint": "9.14.0",
"eslint": "9.18.0",
"jiti": "^2.4.2",
"pkgroll": "^2.5.1",
"rimraf": "^6.0.1",
"sort-package-json": "^2.12.0",
"typescript": "^5.6.3"
},
"peerDependencies": {
"eslint": "9.14.0"
"eslint": "9.18.0",
"jiti": "^2.4.2"
},
"publishConfig": {
"access": "public",
Expand Down
Loading

0 comments on commit e587590

Please sign in to comment.