Skip to content

chore: Use eslint v9 and flat config #738

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 10 commits into from
Apr 19, 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
39 changes: 0 additions & 39 deletions .eslintignore

This file was deleted.

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

This file was deleted.

26 changes: 17 additions & 9 deletions .github/workflows/NodeCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
eslint: [7, 8]
eslint: [7, 8, 9]
node: [20]
include:
# On next ESLint version
- eslint: ^9.0.0-0
node: 20
os: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -58,7 +53,7 @@ jobs:
run: |+
pnpm install -D eslint@${{ matrix.eslint }}
rm -rf node_modules
if: matrix.eslint != 8
if: matrix.eslint != 9
- name: Install Packages
run: pnpm install
- name: Test
Expand All @@ -69,7 +64,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16, 17, 18, 20]
eslint: [9]
node: [18, 20]
include:
# On old Node.js version
- eslint: 8
node: 16
os: ubuntu-latest
- eslint: 8
node: 17
os: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -82,6 +86,10 @@ jobs:
run: |+
pnpm install -D svelte@4
rm -rf node_modules
- name: Install ESLint ${{ matrix.eslint }}
run: |+
pnpm install -D eslint@${{ matrix.eslint }}
rm -rf node_modules
- name: Install Packages
run: pnpm install
- name: Test
Expand All @@ -107,7 +115,7 @@ jobs:
rm -rf node_modules
- name: Install svelte@3
run: |+
pnpm install -D svelte@3 @typescript-eslint/parser@5 @typescript-eslint/eslint-plugin@5
pnpm install -D svelte@3 @typescript-eslint/parser@5 @typescript-eslint/eslint-plugin@5 eslint@8
rm -rf node_modules
- name: Install Packages
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Use `eslint.config.js` file to configure rules. See also: <https://eslint.org/do

Example **eslint.config.js**:

```mjs
```js
import eslintPluginSvelte from 'eslint-plugin-svelte';
export default [
// add more generic rule sets here, such as:
Expand Down
15 changes: 0 additions & 15 deletions docs-svelte-kit/.eslintrc.cjs

This file was deleted.

13 changes: 1 addition & 12 deletions docs-svelte-kit/build-system/build.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,9 @@ import esbuild from 'esbuild';
import path from 'path';
import fs from 'fs';
import { fileURLToPath } from 'url';
// const babelCore = require("@babel/core")
// const t = require("@babel/types")

const dirname = path.dirname(
fileURLToPath(
// @ts-expect-error -- Cannot change `module` option
import.meta.url
)
);
const dirname = path.dirname(fileURLToPath(import.meta.url));

build(path.join(dirname, './src/eslint.mjs'), path.join(dirname, '../shim/eslint.mjs'), [
'assert',
'util'
]);
build(path.join(dirname, '../../node_modules/assert'), path.join(dirname, '../shim/assert.mjs'));

/** build */
Expand Down
6 changes: 0 additions & 6 deletions docs-svelte-kit/build-system/src/eslint.mjs

This file was deleted.

1 change: 0 additions & 1 deletion docs-svelte-kit/shim/fs.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint require-jsdoc:0 -- shim */
function existsSync() {
return false;
}
Expand Down
2 changes: 0 additions & 2 deletions docs-svelte-kit/shim/globby.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/* eslint require-jsdoc:0 -- shim */

export {};
export default {};
1 change: 0 additions & 1 deletion docs-svelte-kit/shim/module.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint require-jsdoc:0 -- shim */
function _createRequire() {
return () => null;
}
Expand Down
1 change: 0 additions & 1 deletion docs-svelte-kit/shim/os.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint require-jsdoc:0 -- shim */
function platform() {
return '';
}
Expand Down
Loading