Skip to content

Commit

Permalink
Merge pull request #1 from brandonaaron/chore/update-deps
Browse files Browse the repository at this point in the history
🧹 Update Dependencies and move to eslint flat config
  • Loading branch information
brandonaaron authored Dec 14, 2023
2 parents c5efd14 + 38cefd0 commit d9d93d0
Show file tree
Hide file tree
Showing 16 changed files with 1,493 additions and 708 deletions.
22 changes: 0 additions & 22 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: '.node-version'
cache: 'npm'
cache-dependency-path: package-lock.json

Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
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
File renamed without changes.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# 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
- chore: Migrate from .nvmrc to .node-version
- chore: Update repo url in package.json
- chore: Move npm run build to prepublishOnly

## [1.0.0] - 2023-10-20

Initial release
54 changes: 54 additions & 0 deletions eslint.config.js
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'],
},
},
]
Loading

0 comments on commit d9d93d0

Please sign in to comment.