-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: Bump eslint to v9 + migrate to flat config
Migrated the eslint config using `npx @eslint/migrate-config .eslintrc.json`, and did not work flawlessly, obviously I had to include config to examples into the root config file. Instead, we are able to delete `.eslintrc` that existed for each example directory though `require-atomic-updates` (has been set to `off`) does not exist in the default configs, so removed the line `@typescript-eslint/no-unnecessary-type-assertion` requires a type assertion, removed it for now
- Loading branch information
Showing
11 changed files
with
343 additions
and
215 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,90 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import html from 'eslint-plugin-html'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
|
||
const compat = new FlatCompat({}); | ||
|
||
export default tseslint.config( | ||
{ | ||
files: ['**/*.{js,mjs,ts}'], | ||
ignores: [ | ||
'packages/*/docs/', | ||
'packages/*/lib/', | ||
'packages/*/node_modules/', | ||
'packages/*/types/', | ||
|
||
'packages/*/examples/**/*.{js,html}', | ||
|
||
'**/jest.config.js', | ||
], | ||
extends: [ | ||
eslint.configs.recommended, | ||
tseslint.configs.recommended, | ||
], | ||
rules: { | ||
curly: ['error', 'multi-line'], | ||
|
||
'no-console': ['error', { | ||
allow: ['info', 'warn', 'error'], | ||
}], | ||
|
||
'@typescript-eslint/naming-convention': ['error', { | ||
selector: 'default', | ||
format: ['camelCase'], | ||
}, { | ||
selector: 'variable', | ||
format: ['camelCase', 'UPPER_CASE'], | ||
leadingUnderscore: 'allow', | ||
}, { | ||
selector: 'typeLike', | ||
format: ['PascalCase'], | ||
}, { | ||
selector: 'memberLike', | ||
modifiers: ['public'], | ||
format: ['camelCase', 'UPPER_CASE'], | ||
leadingUnderscore: 'forbid', | ||
}, { | ||
selector: 'memberLike', | ||
modifiers: ['protected'], | ||
format: ['camelCase', 'UPPER_CASE'], | ||
leadingUnderscore: 'require', | ||
}, { | ||
selector: 'memberLike', | ||
modifiers: ['private'], | ||
format: ['camelCase', 'UPPER_CASE'], | ||
leadingUnderscore: 'require', | ||
}, { | ||
selector: 'enumMember', | ||
format: ['PascalCase'], | ||
}, { | ||
selector: 'import', | ||
format: ['camelCase', 'PascalCase', 'UPPER_CASE'], | ||
}], | ||
|
||
'@typescript-eslint/no-unused-vars': ['warn', { | ||
args: 'none', | ||
}], | ||
|
||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-non-null-assertion': ['off'], | ||
}, | ||
}, | ||
|
||
{ | ||
files: ['packages/*/examples/**/*.{js,html}'], | ||
extends: [ | ||
eslint.configs.recommended, | ||
...compat.extends('mdcs'), | ||
], | ||
plugins: { | ||
html, | ||
}, | ||
rules: { | ||
'padded-blocks': 'off', | ||
'no-unused-vars': 'off', | ||
}, | ||
}, | ||
); |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
packages/three-vrm-materials-hdr-emissive-multiplier/examples/.eslintrc
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.