Skip to content

Commit 5aacace

Browse files
committed
♻️ Use maintained ESLint presets
1 parent 504a15e commit 5aacace

19 files changed

Lines changed: 134 additions & 709 deletions

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ of `@signpdf/signpdf`
1919

2020
## Lint configuration
2121

22-
ESLint 9 uses the root `eslint.config.cjs` for all workspaces. The shared configuration
23-
in `packages/eslint-config` keeps the existing Airbnb rule choices, import checks,
24-
and Jest checks. Examples use ESLint's recommended rules.
22+
ESLint 9 uses the root `eslint.config.mjs` for all workspaces. The shared configuration
23+
in `packages/eslint-config` combines ESLint recommended, Stylistic, import, and Jest
24+
presets with a few project overrides. Examples use ESLint's recommended rules.
2525

2626
Run `yarn lint` for all packages or `yarn workspace @signpdf/utils lint` for one
2727
package. Manage ESLint dependencies at the repository root and plugin dependencies
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
const js = require('@eslint/js');
2-
const globals = require('globals');
3-
const sharedConfig = require('@signpdf/eslint-config');
1+
import js from '@eslint/js';
2+
import {defineConfig} from 'eslint/config';
3+
import globals from 'globals';
4+
import sharedConfig from '@signpdf/eslint-config';
45

56
const packageFiles = [
67
'packages/placeholder-pdf-lib/**/*.js',
@@ -12,7 +13,7 @@ const packageFiles = [
1213
'packages/utils/**/*.js',
1314
];
1415

15-
module.exports = [
16+
export default defineConfig([
1617
{
1718
ignores: [
1819
'**/node_modules/**',
@@ -23,17 +24,17 @@ module.exports = [
2324
],
2425
},
2526
{
26-
...sharedConfig,
2727
files: packageFiles,
28+
extends: [sharedConfig],
2829
},
2930
{
3031
name: 'signpdf/examples',
3132
files: ['packages/examples/**/*.js'],
33+
extends: [js.configs.recommended],
3234
languageOptions: {
3335
ecmaVersion: 2019,
3436
sourceType: 'commonjs',
3537
globals: globals.node,
3638
},
37-
rules: js.configs.recommended.rules,
3839
},
39-
];
40+
]);

‎packages/eslint-config/LICENSE.airbnb‎

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

‎packages/eslint-config/LICENSE.confusing-browser-globals‎

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

0 commit comments

Comments
 (0)