Skip to content

Migrate to eslint 9 #3

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

Merged
merged 18 commits into from
Oct 4, 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
7 changes: 0 additions & 7 deletions .eslintrc

This file was deleted.

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
assignees:
- "omermecitoglu"
30 changes: 0 additions & 30 deletions .github/workflows/release-package.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'

- name: Install dependencies
run: npm ci

# - name: Run tests
# run: npm test

# - name: Upload results to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}

- name: Build package
run: npm run build

- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
dist
48 changes: 39 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,50 @@ npm install @omer-x/eslint-config --save-dev

Ensure you have the following peer dependencies installed:

- `eslint >= 8`
- `eslint >= 9`

## Usage

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

```javascript
module.exports = {
extends: [
"@omer-x/eslint-config",
"@omer-x/eslint-config/typescript" // optional
],
// other configurations...
};
import omer from "@omer-x/eslint-config";

export default [
...omer,
{
rules: {
// add your other rules here
},
},
];
```

Or you can install components individually

```javascript
import base from "@omer-x/eslint-config/base";
import stylistic from "@omer-x/eslint-config/stylistic";
import typescript from "@omer-x/eslint-config/typescript";
import react from "@omer-x/eslint-config/react";
import jsxAccessibility from "@omer-x/eslint-config/jsx-a11y";
import importPlugin from "@omer-x/eslint-config/import";
import unusedImports from "@omer-x/eslint-config/unused-imports";

export default [
...base,
...stylistic,
...typescript,
...react,
...jsxAccessibility,
...importPlugin,
...unusedImports,
{
rules: {
// add your other rules here
},
},
];
```

## License
Expand Down
26 changes: 0 additions & 26 deletions 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 dist from "./dist/index.js";

export default [
...dist,
{
rules: {
"sort-keys": ["error", "asc", { caseSensitive: true, natural: false }],
},
},
];
9 changes: 9 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare module "eslint-plugin-react" {
const value: unknown;
export default value;
}

declare module "eslint-plugin-import" {
const value: unknown;
export default value;
}
31 changes: 0 additions & 31 deletions index.js

This file was deleted.

11 changes: 0 additions & 11 deletions jsx.js

This file was deleted.

Loading