diff --git a/.eslintrc.json b/.eslintrc.json index 09c2e423e9..90345e2cb3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,6 @@ { - "extends": "@antfu" + "extends": [ + "@antfu", + "plugin:@stylistic/migrate/recommended" + ] } diff --git a/package.json b/package.json index 2164256413..cf34c1e785 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ }, "devDependencies": { "@antfu/eslint-config": "workspace:*", + "@stylistic/eslint-plugin-migrate": "^0.0.2", "bumpp": "^9.2.0", "eslint": "^8.49.0", "eslint-plugin-antfu": "link:./packages/eslint-plugin-antfu", diff --git a/packages/eslint-config-basic/index.js b/packages/eslint-config-basic/index.js index e22a7aca6a..d8a6e5df2d 100644 --- a/packages/eslint-config-basic/index.js +++ b/packages/eslint-config-basic/index.js @@ -57,6 +57,7 @@ module.exports = { 'no-only-tests', 'unused-imports', 'jsdoc', + '@stylistic/js', ], settings: { 'import/resolver': { @@ -83,7 +84,7 @@ module.exports = { files: ['*.yaml', '*.yml'], parser: 'yaml-eslint-parser', rules: { - 'spaced-comment': 'off', + '@stylistic/js/spaced-comment': 'off', }, }, { @@ -201,31 +202,37 @@ module.exports = { // Code blocks in markdown file files: ['**/*.md/*.*'], rules: { + 'no-alert': 'off', + 'no-console': 'off', + 'no-restricted-imports': 'off', + 'no-undef': 'off', + 'no-unused-expressions': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-redeclare': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-use-before-define': 'off', '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/comma-dangle': 'off', '@typescript-eslint/consistent-type-imports': 'off', '@typescript-eslint/no-namespace': 'off', '@typescript-eslint/no-require-imports': 'off', - 'import/no-unresolved': 'off', + + '@stylistic/ts/comma-dangle': 'off', + 'unused-imports/no-unused-imports': 'off', 'unused-imports/no-unused-vars': 'off', - 'no-alert': 'off', - 'no-console': 'off', - 'no-restricted-imports': 'off', - 'no-undef': 'off', - 'no-unused-expressions': 'off', - 'no-unused-vars': 'off', + + 'import/no-unresolved': 'off', + 'antfu/no-cjs-exports': 'off', 'antfu/no-ts-export-equal': 'off', + 'n/prefer-global/process': 'off', }, }, ], rules: { - // import + // Import 'import/order': 'error', 'import/first': 'error', 'import/no-mutable-exports': 'error', @@ -247,37 +254,47 @@ module.exports = { { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }, ], + // Stylistic + '@stylistic/js/array-bracket-spacing': ['error', 'never'], + '@stylistic/js/block-spacing': ['error', 'always'], + '@stylistic/js/comma-spacing': ['error', { before: false, after: true }], + '@stylistic/js/func-call-spacing': 'off', + '@stylistic/js/generator-star-spacing': 'off', + '@stylistic/js/indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }], + '@stylistic/js/key-spacing': ['error', { beforeColon: false, afterColon: true }], + '@stylistic/js/no-multi-spaces': 'error', + '@stylistic/js/object-curly-spacing': ['error', 'always'], + '@stylistic/js/operator-linebreak': ['error', 'before'], + '@stylistic/js/space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }], + '@stylistic/js/template-curly-spacing': 'error', + '@stylistic/js/spaced-comment': ['error', 'always', { + line: { + markers: ['/'], + exceptions: ['/', '#'], + }, + block: { + markers: ['!'], + exceptions: ['*'], + balanced: true, + }, + }], + 'no-param-reassign': 'off', - 'array-bracket-spacing': ['error', 'never'], 'brace-style': ['error', 'stroustrup', { allowSingleLine: true }], - 'block-spacing': ['error', 'always'], 'camelcase': 'off', - 'comma-spacing': ['error', { before: false, after: true }], 'comma-style': ['error', 'last'], 'comma-dangle': ['error', 'always-multiline'], 'no-constant-condition': 'warn', 'no-debugger': 'error', 'no-console': ['error', { allow: ['warn', 'error'] }], 'no-cond-assign': ['error', 'always'], - 'func-call-spacing': 'off', - 'key-spacing': ['error', { beforeColon: false, afterColon: true }], - 'indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }], 'no-restricted-syntax': [ 'error', 'DebuggerStatement', 'LabeledStatement', 'WithStatement', ], - 'object-curly-spacing': ['error', 'always'], 'no-return-await': 'off', - 'space-before-function-paren': [ - 'error', - { - anonymous: 'always', - named: 'never', - asyncArrow: 'always', - }, - ], 'no-restricted-globals': [ 'error', { name: 'global', message: 'Use `globalThis` instead.' }, @@ -292,7 +309,7 @@ module.exports = { { property: '__lookupSetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' }, ], - // es6 + // ES6 'no-var': 'error', 'prefer-const': [ 'error', @@ -320,20 +337,7 @@ module.exports = { 'prefer-rest-params': 'error', 'prefer-spread': 'error', 'prefer-template': 'error', - 'template-curly-spacing': 'error', 'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }], - 'generator-star-spacing': 'off', - 'spaced-comment': ['error', 'always', { - line: { - markers: ['/'], - exceptions: ['/', '#'], - }, - block: { - markers: ['!'], - exceptions: ['*'], - balanced: true, - }, - }], // best-practice 'array-callback-return': 'error', @@ -343,7 +347,6 @@ module.exports = { 'eqeqeq': ['error', 'smart'], 'no-alert': 'warn', 'no-case-declarations': 'error', - 'no-multi-spaces': 'error', 'no-multi-str': 'error', 'no-with': 'error', 'no-void': 'error', @@ -352,10 +355,9 @@ module.exports = { 'vars-on-top': 'error', 'require-await': 'off', 'no-return-assign': 'off', - 'operator-linebreak': ['error', 'before'], 'max-statements-per-line': ['error', { max: 1 }], - // node + // Node 'n/prefer-global/process': ['error', 'never'], 'n/prefer-global/buffer': ['error', 'never'], 'n/no-callback-literal': 'off', diff --git a/packages/eslint-config-basic/package.json b/packages/eslint-config-basic/package.json index a755a851f3..567b825a9a 100644 --- a/packages/eslint-config-basic/package.json +++ b/packages/eslint-config-basic/package.json @@ -19,6 +19,7 @@ "eslint": ">=7.4.0" }, "dependencies": { + "@stylistic/eslint-plugin-js": "0.0.2", "eslint-plugin-antfu": "workspace:*", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-html": "^7.1.0", diff --git a/packages/eslint-config-basic/standard.js b/packages/eslint-config-basic/standard.js index 791a2a8750..92fd7d894a 100644 --- a/packages/eslint-config-basic/standard.js +++ b/packages/eslint-config-basic/standard.js @@ -1,5 +1,6 @@ // Inline from https://github.com/standard/eslint-config-standard/blob/master/.eslintrc.json // Until it upgrades +/* eslint @stylistic/migrate/rules: "error" */ module.exports = { parserOptions: { @@ -28,17 +29,12 @@ module.exports = { }, rules: { - 'no-var': 'warn', 'object-shorthand': ['warn', 'properties'], - 'accessor-pairs': ['error', { setWithoutGet: true, enforceForClassMembers: true }], - 'array-bracket-spacing': ['error', 'never'], 'array-callback-return': ['error', { allowImplicit: false, checkForEach: false, }], - 'arrow-spacing': ['error', { before: true, after: true }], - 'block-spacing': ['error', 'always'], 'brace-style': ['error', '1tbs', { allowSingleLine: true }], 'camelcase': ['error', { allow: ['^UNSAFE_'], @@ -52,9 +48,7 @@ module.exports = { exports: 'never', functions: 'never', }], - 'comma-spacing': ['error', { before: false, after: true }], 'comma-style': ['error', 'last'], - 'computed-property-spacing': ['error', 'never', { enforceForClassMembers: true }], 'constructor-super': 'error', 'curly': ['error', 'multi-line'], 'default-case-last': 'error', @@ -62,30 +56,9 @@ module.exports = { 'dot-notation': ['error', { allowKeywords: true }], 'eol-last': 'error', 'eqeqeq': ['error', 'always', { null: 'ignore' }], - 'func-call-spacing': ['error', 'never'], - 'generator-star-spacing': ['error', { before: true, after: true }], - 'indent': ['error', 2, { - SwitchCase: 1, - VariableDeclarator: 1, - outerIIFEBody: 1, - MemberExpression: 1, - FunctionDeclaration: { parameters: 1, body: 1 }, - FunctionExpression: { parameters: 1, body: 1 }, - CallExpression: { arguments: 1 }, - ArrayExpression: 1, - ObjectExpression: 1, - ImportDeclaration: 1, - flatTernaryExpressions: false, - ignoreComments: false, - ignoredNodes: ['TemplateLiteral *', 'JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXFragment', 'JSXOpeningFragment', 'JSXClosingFragment', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'], - offsetTernaryExpressions: true, - }], - 'key-spacing': ['error', { beforeColon: false, afterColon: true }], - 'keyword-spacing': ['error', { before: true, after: true }], - 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], - 'multiline-ternary': ['error', 'always-multiline'], 'new-cap': ['error', { newIsCap: true, capIsNew: false, properties: true }], 'new-parens': 'error', + 'no-var': 'warn', 'no-array-constructor': 'error', 'no-async-promise-executor': 'error', 'no-caller': 'error', @@ -135,10 +108,7 @@ module.exports = { ], allowSamePrecedence: true, }], - 'no-mixed-spaces-and-tabs': 'error', - 'no-multi-spaces': 'error', 'no-multi-str': 'error', - 'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }], 'no-new': 'error', 'no-new-func': 'error', 'no-new-object': 'error', @@ -160,7 +130,6 @@ module.exports = { 'no-template-curly-in-string': 'error', 'no-this-before-super': 'error', 'no-throw-literal': 'error', - 'no-trailing-spaces': 'error', 'no-undef': 'error', 'no-undef-init': 'error', 'no-unexpected-multiline': 'error', @@ -189,44 +158,75 @@ module.exports = { 'no-useless-rename': 'error', 'no-useless-return': 'error', 'no-void': 'error', - 'no-whitespace-before-property': 'error', 'no-with': 'error', - 'object-curly-newline': ['error', { multiline: true, consistent: true }], - 'object-curly-spacing': ['error', 'always'], - 'object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }], 'one-var': ['error', { initialized: 'never' }], - 'operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before', '|>': 'before' } }], - 'padded-blocks': ['error', { blocks: 'never', switches: 'never', classes: 'never' }], 'prefer-const': ['error', { destructuring: 'all' }], 'prefer-promise-reject-errors': 'error', 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }], 'quote-props': ['error', 'as-needed'], 'quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }], - 'rest-spread-spacing': ['error', 'never'], 'semi': ['error', 'never'], - 'semi-spacing': ['error', { before: false, after: true }], - 'space-before-blocks': ['error', 'always'], - 'space-before-function-paren': ['error', 'always'], - 'space-in-parens': ['error', 'never'], - 'space-infix-ops': 'error', - 'space-unary-ops': ['error', { words: true, nonwords: false }], - 'spaced-comment': ['error', 'always', { - line: { markers: ['*package', '!', '/', ',', '='] }, - block: { balanced: true, markers: ['*package', '!', ',', ':', '::', 'flow-include'], exceptions: ['*'] }, - }], 'symbol-description': 'error', - 'template-curly-spacing': ['error', 'never'], - 'template-tag-spacing': ['error', 'never'], 'unicode-bom': ['error', 'never'], - 'use-isnan': ['error', { - enforceForSwitchCase: true, - enforceForIndexOf: true, - }], + 'use-isnan': ['error', { enforceForSwitchCase: true, enforceForIndexOf: true }], 'valid-typeof': ['error', { requireStringLiterals: true }], 'wrap-iife': ['error', 'any', { functionPrototypeMethods: true }], - 'yield-star-spacing': ['error', 'both'], 'yoda': ['error', 'never'], + + // Stylistic + '@stylistic/js/array-bracket-spacing': ['error', 'never'], + '@stylistic/js/arrow-spacing': ['error', { before: true, after: true }], + '@stylistic/js/block-spacing': ['error', 'always'], + '@stylistic/js/comma-spacing': ['error', { before: false, after: true }], + '@stylistic/js/computed-property-spacing': ['error', 'never', { enforceForClassMembers: true }], + '@stylistic/js/func-call-spacing': ['error', 'never'], + '@stylistic/js/generator-star-spacing': ['error', { before: true, after: true }], + '@stylistic/js/key-spacing': ['error', { beforeColon: false, afterColon: true }], + '@stylistic/js/keyword-spacing': ['error', { before: true, after: true }], + '@stylistic/js/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], + '@stylistic/js/multiline-ternary': ['error', 'always-multiline'], + '@stylistic/js/no-mixed-spaces-and-tabs': 'error', + '@stylistic/js/no-multi-spaces': 'error', + '@stylistic/js/no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }], + '@stylistic/js/no-trailing-spaces': 'error', + '@stylistic/js/no-whitespace-before-property': 'error', + '@stylistic/js/object-curly-newline': ['error', { multiline: true, consistent: true }], + '@stylistic/js/object-curly-spacing': ['error', 'always'], + '@stylistic/js/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }], + '@stylistic/js/operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before', '|>': 'before' } }], + '@stylistic/js/padded-blocks': ['error', { blocks: 'never', switches: 'never', classes: 'never' }], + '@stylistic/js/rest-spread-spacing': ['error', 'never'], + '@stylistic/js/semi-spacing': ['error', { before: false, after: true }], + '@stylistic/js/space-before-blocks': ['error', 'always'], + '@stylistic/js/space-before-function-paren': ['error', 'always'], + '@stylistic/js/space-in-parens': ['error', 'never'], + '@stylistic/js/space-infix-ops': 'error', + '@stylistic/js/space-unary-ops': ['error', { words: true, nonwords: false }], + '@stylistic/js/template-curly-spacing': ['error', 'never'], + '@stylistic/js/template-tag-spacing': ['error', 'never'], + '@stylistic/js/yield-star-spacing': ['error', 'both'], + '@stylistic/js/spaced-comment': ['error', 'always', { + line: { markers: ['*package', '!', '/', ',', '='] }, + block: { balanced: true, markers: ['*package', '!', ',', ':', '::', 'flow-include'], exceptions: ['*'] }, + }], + '@stylistic/js/indent': ['error', 2, { + SwitchCase: 1, + VariableDeclarator: 1, + outerIIFEBody: 1, + MemberExpression: 1, + FunctionDeclaration: { parameters: 1, body: 1 }, + FunctionExpression: { parameters: 1, body: 1 }, + CallExpression: { arguments: 1 }, + ArrayExpression: 1, + ObjectExpression: 1, + ImportDeclaration: 1, + flatTernaryExpressions: false, + ignoreComments: false, + ignoredNodes: ['TemplateLiteral *', 'JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXFragment', 'JSXOpeningFragment', 'JSXClosingFragment', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'], + offsetTernaryExpressions: true, + }], + // Import 'import/export': 'error', 'import/first': 'error', 'import/no-absolute-path': ['error', { esmodule: true, commonjs: true, amd: false }], @@ -234,6 +234,7 @@ module.exports = { 'import/no-named-default': 'error', 'import/no-webpack-loader-syntax': 'error', + // Node 'n/handle-callback-err': ['error', '^(err|error)$'], 'n/no-callback-literal': 'error', 'n/no-deprecated-api': 'error', @@ -242,6 +243,7 @@ module.exports = { 'n/no-path-concat': 'error', 'n/process-exit-as-throw': 'error', + // Promise 'promise/param-names': 'error', }, } diff --git a/packages/eslint-config-ts/index.js b/packages/eslint-config-ts/index.js index a4065960b5..e1064e37ff 100644 --- a/packages/eslint-config-ts/index.js +++ b/packages/eslint-config-ts/index.js @@ -11,6 +11,9 @@ module.exports = { 'plugin:import/typescript', 'plugin:@typescript-eslint/recommended', ], + plugins: [ + '@stylistic/ts', + ], settings: { 'import/resolver': { node: { extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.d.ts'] }, @@ -187,16 +190,64 @@ module.exports = { // TS '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }], - '@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }], - '@typescript-eslint/type-annotation-spacing': ['error', {}], '@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false }], '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], '@typescript-eslint/prefer-ts-expect-error': 'error', '@typescript-eslint/no-require-imports': 'error', + + // TS Stylistic + '@stylistic/ts/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }], + '@stylistic/ts/type-annotation-spacing': ['error', {}], + // Override JS 'no-useless-constructor': 'off', - 'indent': 'off', - '@typescript-eslint/indent': ['error', 2, { + 'no-invalid-this': 'off', + '@typescript-eslint/no-invalid-this': 'error', + 'no-redeclare': 'off', + '@typescript-eslint/no-redeclare': 'error', + 'no-use-before-define': 'off', + '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }], + 'no-dupe-class-members': 'off', + '@typescript-eslint/no-dupe-class-members': 'error', + 'no-loss-of-precision': 'off', + '@typescript-eslint/no-loss-of-precision': 'error', + + // Stylistic JS/TS Misalignments (should be fixed upstream) + 'brace-style': 'off', + '@stylistic/ts/brace-style': ['error', 'stroustrup', { allowSingleLine: true }], + 'comma-dangle': 'off', + '@stylistic/ts/comma-dangle': ['error', 'always-multiline'], + '@stylistic/js/object-curly-spacing': 'off', + '@typescript-eslint/object-curly-spacing': ['error', 'always'], + 'semi': 'off', + '@stylistic/ts/semi': ['error', 'never'], + 'quotes': 'off', + '@stylistic/ts/quotes': ['error', 'single'], + 'no-extra-parens': 'off', + '@stylistic/ts/no-extra-parens': ['error', 'functions'], + + // Stylistic JS/TS + '@stylistic/js/space-before-blocks': 'off', + '@stylistic/ts/space-before-blocks': ['error', 'always'], + '@stylistic/js/space-before-function-paren': 'off', + '@stylistic/ts/space-before-function-paren': [ + 'error', + { + anonymous: 'always', + named: 'never', + asyncArrow: 'always', + }, + ], + '@stylistic/js/space-infix-ops': 'off', + '@stylistic/ts/space-infix-ops': 'error', + '@stylistic/js/keyword-spacing': 'off', + '@stylistic/ts/keyword-spacing': ['error', { before: true, after: true }], + '@stylistic/js/comma-spacing': 'off', + '@stylistic/ts/comma-spacing': ['error', { before: false, after: true }], + '@stylistic/js/lines-between-class-members': 'off', + '@stylistic/ts/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], + '@stylistic/js/indent': 'off', + '@stylistic/ts/indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1, @@ -234,47 +285,6 @@ module.exports = { ], offsetTernaryExpressions: true, }], - 'no-invalid-this': 'off', - '@typescript-eslint/no-invalid-this': 'error', - 'no-redeclare': 'off', - '@typescript-eslint/no-redeclare': 'error', - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }], - 'brace-style': 'off', - '@typescript-eslint/brace-style': ['error', 'stroustrup', { allowSingleLine: true }], - 'comma-dangle': 'off', - '@typescript-eslint/comma-dangle': ['error', 'always-multiline'], - 'object-curly-spacing': 'off', - '@typescript-eslint/object-curly-spacing': ['error', 'always'], - 'semi': 'off', - '@typescript-eslint/semi': ['error', 'never'], - 'quotes': 'off', - '@typescript-eslint/quotes': ['error', 'single'], - 'space-before-blocks': 'off', - '@typescript-eslint/space-before-blocks': ['error', 'always'], - 'space-before-function-paren': 'off', - '@typescript-eslint/space-before-function-paren': [ - 'error', - { - anonymous: 'always', - named: 'never', - asyncArrow: 'always', - }, - ], - 'space-infix-ops': 'off', - '@typescript-eslint/space-infix-ops': 'error', - 'keyword-spacing': 'off', - '@typescript-eslint/keyword-spacing': ['error', { before: true, after: true }], - 'comma-spacing': 'off', - '@typescript-eslint/comma-spacing': ['error', { before: false, after: true }], - 'no-extra-parens': 'off', - '@typescript-eslint/no-extra-parens': ['error', 'functions'], - 'no-dupe-class-members': 'off', - '@typescript-eslint/no-dupe-class-members': 'error', - 'no-loss-of-precision': 'off', - '@typescript-eslint/no-loss-of-precision': 'error', - 'lines-between-class-members': 'off', - '@typescript-eslint/lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], // antfu 'antfu/generic-spacing': 'error', diff --git a/packages/eslint-config-ts/package.json b/packages/eslint-config-ts/package.json index af1502ef64..80d1024217 100644 --- a/packages/eslint-config-ts/package.json +++ b/packages/eslint-config-ts/package.json @@ -18,6 +18,7 @@ }, "dependencies": { "@antfu/eslint-config-basic": "workspace:*", + "@stylistic/eslint-plugin-ts": "0.0.2", "@typescript-eslint/eslint-plugin": "^6.7.0", "@typescript-eslint/parser": "^6.7.0", "eslint-plugin-jest": "^27.2.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5caea39204..601c1b6f39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@antfu/eslint-config': specifier: workspace:* version: link:packages/eslint-config + '@stylistic/eslint-plugin-migrate': + specifier: ^0.0.2 + version: 0.0.2(eslint@8.49.0)(typescript@5.2.2) bumpp: specifier: ^9.2.0 version: 9.2.0 @@ -78,6 +81,9 @@ importers: packages/eslint-config-basic: dependencies: + '@stylistic/eslint-plugin-js': + specifier: 0.0.2 + version: 0.0.2 eslint-plugin-antfu: specifier: workspace:* version: link:../eslint-plugin-antfu @@ -155,6 +161,9 @@ importers: '@antfu/eslint-config-basic': specifier: workspace:* version: link:../eslint-config-basic + '@stylistic/eslint-plugin-ts': + specifier: 0.0.2 + version: 0.0.2(eslint@8.49.0)(typescript@5.0.2) '@typescript-eslint/eslint-plugin': specifier: ^6.7.0 version: 6.7.0(@typescript-eslint/parser@6.7.0)(eslint@8.49.0)(typescript@5.0.2) @@ -1053,6 +1062,10 @@ packages: resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + /@eslint-stylistic/metadata@0.0.2: + resolution: {integrity: sha512-hKX4W7NLuUjpr1vTaaVCn1KGsp6vTpJHFcJyioVe9VcVeY8l7PQSC3Tfv7eXNz5srhDA8APbmxD/TxQbszEJ6Q==} + dev: true + /@eslint/eslintrc@2.1.2: resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1269,6 +1282,45 @@ packages: resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} dev: true + /@stylistic/eslint-plugin-js@0.0.2: + resolution: {integrity: sha512-ls/UeiYVOZSOndF48TO2H38Mvslt77zK1MqzuLYHSbYKU66kASHakwT5SvV5h4DPiSp3SuGjFBbD3se87ICWSg==} + dependencies: + acorn: 8.10.0 + escape-string-regexp: 4.0.0 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esutils: 2.0.3 + graphemer: 1.4.0 + dev: false + + /@stylistic/eslint-plugin-migrate@0.0.2(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-wp8yjmmrVxF6+P4vIIw2QbrHdn2WUXJi04kvFJb34zIzHtsqth9K1HzSKLGMOUWdTv8eAmN6P7UoB8NK2FKKjQ==} + dependencies: + '@eslint-stylistic/metadata': 0.0.2 + '@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + + /@stylistic/eslint-plugin-ts@0.0.2(eslint@8.49.0)(typescript@5.0.2): + resolution: {integrity: sha512-V/12gN2gSfWbWxr5fxN2BfkpEuV69qI6hJM3Ut8lmmOlNpvxW++pseDxhsoIAIs3+nOTdWv6hSUFcEaZNICaWw==} + peerDependencies: + eslint: '*' + typescript: '*' + dependencies: + '@typescript-eslint/scope-manager': 6.7.0 + '@typescript-eslint/type-utils': 6.7.0(eslint@8.49.0)(typescript@5.0.2) + '@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.0.2) + eslint: 8.49.0 + graphemer: 1.4.0 + semver: 7.5.4 + typescript: 5.0.2 + transitivePeerDependencies: + - supports-color + dev: false + /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: @@ -1626,7 +1678,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.61.0 - eslint-visitor-keys: 3.4.2 + eslint-visitor-keys: 3.4.3 dev: false /@typescript-eslint/visitor-keys@6.7.0: @@ -1694,6 +1746,12 @@ packages: engines: {node: '>=0.4.0'} dev: true + /acorn@8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: false + /acorn@8.8.2: resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} engines: {node: '>=0.4.0'} @@ -2528,7 +2586,7 @@ packages: eslint: 8.49.0 eslint-import-resolver-node: 0.3.7 eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.0)(eslint-import-resolver-node@0.3.7)(eslint@8.49.0) - get-tsconfig: 4.6.2 + get-tsconfig: 4.7.0 is-glob: 4.0.3 minimatch: 3.1.2 resolve: 1.22.3 @@ -3036,12 +3094,6 @@ packages: get-intrinsic: 1.2.0 dev: false - /get-tsconfig@4.6.2: - resolution: {integrity: sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==} - dependencies: - resolve-pkg-maps: 1.0.0 - dev: false - /get-tsconfig@4.7.0: resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} dependencies: