Skip to content
Open
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
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

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

This file was deleted.

6 changes: 0 additions & 6 deletions .prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions .prettierrc.js

This file was deleted.

5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ validate:
--noEmit

./node_modules/.bin/eslint \
. \
--ext .js \
--ext .ts \
--ext .tsx
.

./node_modules/.bin/prettier \
. \
Expand Down
25 changes: 25 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig, globalIgnores } from 'eslint/config';

Check failure on line 1 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space before '}'

Check failure on line 1 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space after '{'
import globals from 'globals';
import ConfigXo from 'eslint-config-xo';
import ConfigJest from 'eslint-plugin-jest';

export default defineConfig([
{ languageOptions: { globals: { ...globals.node } } },

Check failure on line 7 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space before '}'

Check failure on line 7 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space before '}'

Check failure on line 7 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space before '}'

Check failure on line 7 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space after '{'

Check failure on line 7 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space after '{'

Check failure on line 7 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space after '{'
...ConfigXo({

Check failure on line 8 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

A function with a name starting with an uppercase letter should only be used as a constructor
browser: true,
semicolon: true,
space: 2,
}),
{
files: ['**/*.test.*'],
languageOptions: { globals: { ...globals.jest } },

Check failure on line 15 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Validations

There should be no space after '{'
...ConfigJest.configs['flat/recommended'],
...ConfigJest.configs['flat/style'],
},
Comment on lines +13 to +18
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Jest ESLint override only targets files matching "**/.test.", but this repo's Jest tests are ".spec.ts" and "jest..ts" (e.g. src/useWebStorage.spec.ts). As-is, Jest globals/rules won’t apply to existing tests and lint will likely fail or miss intended test-specific rules. Update the "files" globs to include the project’s actual test naming patterns.

Copilot uses AI. Check for mistakes.
globalIgnores([
'coverage/',
'example/',
'tests/',
'package-lock.json',
]),
Comment on lines +19 to +24
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flat-config ignores don’t include the generated "dist/" directory (previously ignored via .eslintignore, and still gitignored). If developers run build before validate, "eslint ." can end up linting generated output. Add "dist/" to globalIgnores (or otherwise ignore it) to keep linting focused on source.

Copilot uses AI. Check for mistakes.
]);
Loading
Loading