Skip to content

Commit

Permalink
chore(deps): update dependency @jenssimon/eslint-config-base to v8 (#206
Browse files Browse the repository at this point in the history
)

* chore(deps): update dependency @jenssimon/eslint-config-base to v8

* ci(lint): update config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jens Simon <jens.simon80@googlemail.com>
  • Loading branch information
renovate[bot] and jenssimon authored Jan 4, 2025
1 parent 4013eaf commit d2745c9
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 506 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ yarn-error.log
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.yalc/
yalc.lock
15 changes: 0 additions & 15 deletions demo/.eslintrc

This file was deleted.

89 changes: 89 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'

import globals from 'globals'

import { FlatCompat } from '@eslint/eslintrc'
import { fixupConfigRules } from '@eslint/compat'


// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url) // eslint-disable-line no-underscore-dangle
const __dirname = path.dirname(__filename) // eslint-disable-line no-underscore-dangle

const compat = new FlatCompat({
baseDirectory: __dirname,
})


export default [
{
ignores: [
'.yarn/',
'.yalc/',
'dist/',
'demo/dist/',
'coverage/',
],
},

...fixupConfigRules(compat.config({
parserOptions: {
project: 'tsconfig.json',
},
extends: [
'@jenssimon/base',
],
overrides: [
{
files: [
'*.ts',
],
extends: [
'@jenssimon/typescript',
],
rules: {
'@typescript-eslint/naming-convention': 'off',
},
},
{
files: [
'**/*.test.*',
'**/*.spec.*',
'**/__tests__/**',
'**/__mocks__/**',
],
plugins: [
'@vitest',
],
extends: [
'plugin:@vitest/legacy-recommended',
],
},
],
})).map((rule) => ({
files: [
'**/*.js',
'**/*.ts',
],
...rule,
})),

{
files: [
'demo/**',
],
languageOptions: {
globals: {
...globals.browser,
},
},
rules: {
'no-await-in-loop': 'off',
'no-constant-condition': 'off',
'no-restricted-syntax': 'off',
'promise/prefer-await-to-then': 'off',
'unicorn/prefer-top-level-await': 'off',
},
},
]
54 changes: 7 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"type": "module",
"scripts": {
"lint": "run-p 'lint:*'",
"lint:js": "eslint --ext .js,.mjs,.cjs,.ts,.mts,.cts .",
"lint:js": "eslint .",
"lint:css": "stylelint '**/*.css'",
"build": "tsc",
"predemo": "run-s build",
Expand All @@ -41,15 +41,18 @@
"devDependencies": {
"@commitlint/cli": "19.6.1",
"@commitlint/config-conventional": "19.6.0",
"@jenssimon/eslint-config-base": "7.6.5",
"@jenssimon/eslint-config-typescript": "5.3.31",
"@eslint/compat": "^1.2.4",
"@eslint/eslintrc": "^3.2.0",
"@jenssimon/eslint-config-base": "8.0.0",
"@jenssimon/eslint-config-typescript": "5.3.29",
"@preact/signals-core": "^1.6.0",
"@types/node": "22.10.3",
"@vitest/coverage-v8": "^2.0.0",
"@vitest/eslint-plugin": "^1.1.14",
"commitizen": "4.3.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "8.57.1",
"globals": "^15.14.0",
"husky": "9.1.7",
"jsdom": "^25.0.0",
"lint-staged": "15.3.0",
Expand All @@ -67,50 +70,7 @@
"dist/src/loader.js",
"dist/src/loader.d.ts"
],
"eslintConfig": {
"parserOptions": {
"project": "tsconfig.json"
},
"extends": [
"@jenssimon/base/frontend"
],
"overrides": [
{
"files": [
"*.ts"
],
"extends": [
"@jenssimon/typescript"
],
"rules": {
"@typescript-eslint/naming-convention": "off"
}
},
{
"files": [
"**/*.test.*",
"**/*.spec.*",
"**/__tests__/**",
"**/__mocks__/**"
],
"plugins": [
"@vitest"
],
"extends": [
"plugin:@vitest/legacy-recommended"
]
},
{
"files": [
"*.cjs"
],
"rules": {
"import/no-commonjs": "off"
}
}
]
},
"packageManager": "yarn@4.6.0",
"packageManager": "yarn@4.5.3",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
Loading

0 comments on commit d2745c9

Please sign in to comment.