Skip to content

Commit 5376b07

Browse files
Merge pull request #3 from omermecitoglu/1-migration-to-eslint-9
Migrate to eslint 9
2 parents 4017d42 + 4741992 commit 5376b07

24 files changed

+2020
-1369
lines changed

.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
assignees:
8+
- "omermecitoglu"

.github/workflows/release-package.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 'latest'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
# - name: Run tests
26+
# run: npm test
27+
28+
# - name: Upload results to Codecov
29+
# uses: codecov/codecov-action@v4
30+
# with:
31+
# token: ${{ secrets.CODECOV_TOKEN }}
32+
33+
- name: Build package
34+
run: npm run build
35+
36+
- name: Run semantic-release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
run: npx semantic-release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/node_modules
2+
dist

README.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,50 @@ npm install @omer-x/eslint-config --save-dev
2020

2121
Ensure you have the following peer dependencies installed:
2222

23-
- `eslint >= 8`
23+
- `eslint >= 9`
2424

2525
## Usage
2626

27-
Add the configuration to your ESLint configuration file (e.g., `.eslintrc.js`):
27+
Add the configuration to your ESLint configuration file (e.g., `eslint.config.js` or `eslint.config.mjs`):
2828

2929
```javascript
30-
module.exports = {
31-
extends: [
32-
"@omer-x/eslint-config",
33-
"@omer-x/eslint-config/typescript" // optional
34-
],
35-
// other configurations...
36-
};
30+
import omer from "@omer-x/eslint-config";
31+
32+
export default [
33+
...omer,
34+
{
35+
rules: {
36+
// add your other rules here
37+
},
38+
},
39+
];
40+
```
41+
42+
Or you can install components individually
43+
44+
```javascript
45+
import base from "@omer-x/eslint-config/base";
46+
import stylistic from "@omer-x/eslint-config/stylistic";
47+
import typescript from "@omer-x/eslint-config/typescript";
48+
import react from "@omer-x/eslint-config/react";
49+
import jsxAccessibility from "@omer-x/eslint-config/jsx-a11y";
50+
import importPlugin from "@omer-x/eslint-config/import";
51+
import unusedImports from "@omer-x/eslint-config/unused-imports";
52+
53+
export default [
54+
...base,
55+
...stylistic,
56+
...typescript,
57+
...react,
58+
...jsxAccessibility,
59+
...importPlugin,
60+
...unusedImports,
61+
{
62+
rules: {
63+
// add your other rules here
64+
},
65+
},
66+
];
3767
```
3868

3969
## License

base.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

eslint.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import dist from "./dist/index.js";
2+
3+
export default [
4+
...dist,
5+
{
6+
rules: {
7+
"sort-keys": ["error", "asc", { caseSensitive: true, natural: false }],
8+
},
9+
},
10+
];

global.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
declare module "eslint-plugin-react" {
2+
const value: unknown;
3+
export default value;
4+
}
5+
6+
declare module "eslint-plugin-import" {
7+
const value: unknown;
8+
export default value;
9+
}

index.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

jsx.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)