Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e77637da4 | ||
|
|
abf5c27385 | ||
|
|
7b48da27dc | ||
|
|
0947ddb151 | ||
|
|
0a9c9b0384 | ||
|
|
84ae087ea0 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-monorepo",
|
"name": "@antfu/eslint-config-monorepo",
|
||||||
"version": "0.39.4",
|
"version": "0.39.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@8.5.1",
|
"packageManager": "pnpm@8.5.1",
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ module.exports = {
|
|||||||
'no-debugger': 'error',
|
'no-debugger': 'error',
|
||||||
'no-console': ['error', { allow: ['warn', 'error'] }],
|
'no-console': ['error', { allow: ['warn', 'error'] }],
|
||||||
'no-cond-assign': ['error', 'always'],
|
'no-cond-assign': ['error', 'always'],
|
||||||
'func-call-spacing': ['off', 'never'],
|
'func-call-spacing': 'off',
|
||||||
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
||||||
'indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
|
'indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
|
||||||
'no-restricted-syntax': [
|
'no-restricted-syntax': [
|
||||||
@@ -263,17 +263,27 @@ module.exports = {
|
|||||||
'error',
|
'error',
|
||||||
{ name: 'global', message: 'Use `globalThis` instead.' },
|
{ name: 'global', message: 'Use `globalThis` instead.' },
|
||||||
{ name: 'self', message: 'Use `globalThis` instead.' },
|
{ name: 'self', message: 'Use `globalThis` instead.' },
|
||||||
{ name: 'isNaN', message: 'Use `Number.isNaN` instead' },
|
{ name: 'isNaN', message: 'Use `Number.isNaN` instead.' },
|
||||||
{ name: 'isFinite', message: 'Use `Number.isFinite` instead' },
|
{ name: 'isFinite', message: 'Use `Number.isFinite` instead.' },
|
||||||
{ name: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
|
{ name: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
|
||||||
{ name: 'parseInt', message: 'Use `Number.parseInt` instead' },
|
{ name: 'parseInt', message: 'Use `Number.parseInt` instead.' },
|
||||||
],
|
],
|
||||||
'no-restricted-properties': [
|
'no-restricted-properties': [
|
||||||
'error',
|
'error',
|
||||||
{ object: 'globalThis', property: 'isNaN', message: 'Use `Number.isNaN` instead' },
|
{ object: 'globalThis', property: 'isNaN', message: 'Use `Number.isNaN` instead.' },
|
||||||
{ object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead' },
|
{ object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead.' },
|
||||||
{ object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
|
{ object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
|
||||||
{ object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead' },
|
{ object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead.' },
|
||||||
|
{ object: 'window', property: 'isNaN', message: 'Use `Number.isNaN` instead.' },
|
||||||
|
{ object: 'window', property: 'isFinite', message: 'Use `Number.isFinite` instead.' },
|
||||||
|
{ object: 'window', property: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
|
||||||
|
{ object: 'window', property: 'parseInt', message: 'Use `Number.parseInt` instead.' },
|
||||||
|
{ object: 'Math', property: 'pow', message: 'Use the exponentiation operator (**) instead.' },
|
||||||
|
{ property: '__proto__', message: 'Use `Object.getPrototypeOf` instead.' },
|
||||||
|
{ property: '__defineGetter__', message: 'Use `Object.defineProperty` instead.' },
|
||||||
|
{ property: '__defineSetter__', message: 'Use `Object.defineProperty` instead.' },
|
||||||
|
{ property: '__lookupGetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' },
|
||||||
|
{ property: '__lookupSetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' },
|
||||||
],
|
],
|
||||||
|
|
||||||
// es6
|
// es6
|
||||||
@@ -323,7 +333,7 @@ module.exports = {
|
|||||||
'array-callback-return': 'error',
|
'array-callback-return': 'error',
|
||||||
'block-scoped-var': 'error',
|
'block-scoped-var': 'error',
|
||||||
'consistent-return': 'off',
|
'consistent-return': 'off',
|
||||||
'complexity': ['off', 11],
|
'complexity': 'off',
|
||||||
'eqeqeq': ['error', 'smart'],
|
'eqeqeq': ['error', 'smart'],
|
||||||
'no-alert': 'warn',
|
'no-alert': 'warn',
|
||||||
'no-case-declarations': 'error',
|
'no-case-declarations': 'error',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-basic",
|
"name": "@antfu/eslint-config-basic",
|
||||||
"version": "0.39.4",
|
"version": "0.39.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -9,20 +9,24 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
},
|
},
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
es2021: true,
|
es2021: true,
|
||||||
node: true,
|
node: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
'import',
|
'import',
|
||||||
'n',
|
'n',
|
||||||
'promise',
|
'promise',
|
||||||
],
|
],
|
||||||
|
|
||||||
globals: {
|
globals: {
|
||||||
document: 'readonly',
|
document: 'readonly',
|
||||||
navigator: 'readonly',
|
navigator: 'readonly',
|
||||||
window: 'readonly',
|
window: 'readonly',
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
'no-var': 'warn',
|
'no-var': 'warn',
|
||||||
'object-shorthand': ['warn', 'properties'],
|
'object-shorthand': ['warn', 'properties'],
|
||||||
@@ -126,7 +130,7 @@ module.exports = {
|
|||||||
'no-mixed-operators': ['error', {
|
'no-mixed-operators': ['error', {
|
||||||
groups: [
|
groups: [
|
||||||
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
||||||
['&&', '||', '?:'],
|
['&&', '||'],
|
||||||
['in', 'instanceof'],
|
['in', 'instanceof'],
|
||||||
],
|
],
|
||||||
allowSamePrecedence: true,
|
allowSamePrecedence: true,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-react",
|
"name": "@antfu/eslint-config-react",
|
||||||
"version": "0.39.4",
|
"version": "0.39.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -72,8 +72,6 @@ module.exports = {
|
|||||||
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
||||||
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
||||||
'@typescript-eslint/no-require-imports': 'error',
|
'@typescript-eslint/no-require-imports': 'error',
|
||||||
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }],
|
|
||||||
|
|
||||||
// Override JS
|
// Override JS
|
||||||
'no-useless-constructor': 'off',
|
'no-useless-constructor': 'off',
|
||||||
'indent': 'off',
|
'indent': 'off',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-ts",
|
"name": "@antfu/eslint-config-ts",
|
||||||
"version": "0.39.4",
|
"version": "0.39.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-vue",
|
"name": "@antfu/eslint-config-vue",
|
||||||
"version": "0.39.4",
|
"version": "0.39.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config",
|
"name": "@antfu/eslint-config",
|
||||||
"version": "0.39.4",
|
"version": "0.39.5",
|
||||||
"description": "Anthony's ESLint config",
|
"description": "Anthony's ESLint config",
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eslint-plugin-antfu",
|
"name": "eslint-plugin-antfu",
|
||||||
"version": "0.39.4",
|
"version": "0.39.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://github.com/antfu/eslint-config",
|
"homepage": "https://github.com/antfu/eslint-config",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
|
|||||||
Reference in New Issue
Block a user