-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧹: update deps; eslint flat config + stylistic; lint pre-commit
- Loading branch information
1 parent
8f2f6a1
commit 2adba0f
Showing
14 changed files
with
1,488 additions
and
707 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint:fix:staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
- chore: Update dependencies | ||
- chore: Move to eslint flat config and stylistic package | ||
- chore: Implement list-staged and husky for pre-commit linting | ||
- chore: Drop custom focus plugin in unit tests | ||
- chore: Use jsdeliver cdn in examples | ||
- chore: Fix example in README.md | ||
|
||
## [1.0.0] - 2023-10-20 | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import globals from 'globals' | ||
import eslint from '@eslint/js' | ||
import stylistic from '@stylistic/eslint-plugin' | ||
import typescriptParser from '@typescript-eslint/parser' | ||
import typescriptPlugin from '@typescript-eslint/eslint-plugin' | ||
|
||
export default [ | ||
{ ignores: ['dist', 'docs'] }, | ||
eslint.configs.recommended, | ||
stylistic.configs['recommended-flat'], | ||
{ | ||
rules: { | ||
'@stylistic/max-statements-per-line': 'off', | ||
'@stylistic/brace-style': 'off', | ||
'@stylistic/multiline-ternary': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.js'], | ||
languageOptions: { | ||
sourceType: 'module', | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.es6, | ||
...globals.commonjs, | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ['*.ts', '**/*.ts'], | ||
plugins: { | ||
'@typescript-eslint': typescriptPlugin, | ||
}, | ||
languageOptions: { | ||
sourceType: 'module', | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.es6, | ||
...globals.mocha, | ||
}, | ||
parser: typescriptParser, | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
ecmaVersion: 2022, | ||
}, | ||
}, | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': ['error'], | ||
}, | ||
}, | ||
] |
Oops, something went wrong.