Compare commits

...

7 Commits

Author SHA1 Message Date
Anthony Fu
5d908028ca chore: release v0.39.4 2023-05-31 09:53:19 +02:00
Anthony Fu
610d886afd chore: remove window restriction 2023-05-31 09:52:26 +02:00
曾明健
aefa76e48a feat(basic): ban some deprecated global functions (#190) 2023-05-31 09:51:21 +02:00
曾明健
e787e9a647 feat(basic): ban global variable (#189) 2023-05-26 17:39:10 +02:00
曾明健
a3598d36d2 feat(ts): enable @typescript-eslint/consistent-type-assertions (#188) 2023-05-26 17:38:54 +02:00
Anthony Fu
7b399a63db chore: release v0.39.3 2023-05-23 13:39:23 +02:00
Anthony Fu
bb09e1d6b4 fix(vue): disable vue/no-dupe-keys 2023-05-23 13:39:17 +02:00
10 changed files with 25 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-monorepo",
"version": "0.39.2",
"version": "0.39.4",
"private": true,
"packageManager": "pnpm@8.5.1",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",

View File

@@ -259,6 +259,22 @@ module.exports = {
asyncArrow: 'always',
},
],
'no-restricted-globals': [
'error',
{ name: 'global', message: 'Use `globalThis` instead.' },
{ name: 'self', message: 'Use `globalThis` instead.' },
{ name: 'isNaN', message: 'Use `Number.isNaN` instead' },
{ name: 'isFinite', message: 'Use `Number.isFinite` instead' },
{ name: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
{ name: 'parseInt', message: 'Use `Number.parseInt` instead' },
],
'no-restricted-properties': [
'error',
{ object: 'globalThis', property: 'isNaN', message: 'Use `Number.isNaN` instead' },
{ object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead' },
{ object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
{ object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead' },
],
// es6
'no-var': 'error',

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-basic",
"version": "0.39.2",
"version": "0.39.4",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-react",
"version": "0.39.2",
"version": "0.39.4",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",

View File

@@ -72,6 +72,7 @@ module.exports = {
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }],
// Override JS
'no-useless-constructor': 'off',

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-ts",
"version": "0.39.2",
"version": "0.39.4",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",

View File

@@ -36,6 +36,7 @@ module.exports = {
'vue/multi-word-component-names': 'off',
'vue/prefer-import-from-vue': 'off',
'vue/no-v-text-v-html-on-component': 'off',
'vue/no-dupe-keys': 'off',
// reactivity transform
'vue/no-setup-props-destructure': 'off',

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-vue",
"version": "0.39.2",
"version": "0.39.4",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config",
"version": "0.39.2",
"version": "0.39.4",
"description": "Anthony's ESLint config",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-antfu",
"version": "0.39.2",
"version": "0.39.4",
"license": "MIT",
"homepage": "https://github.com/antfu/eslint-config",
"main": "./dist/index.cjs",