diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 12447de..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/safe+align" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/.npmignore b/.npmignore index c43ec3f..20e9835 100644 --- a/.npmignore +++ b/.npmignore @@ -6,3 +6,4 @@ yarn-error.log fixture coverage +*.config.* diff --git a/.nycrc.json b/.nycrc.json index 1c47765..ff04cf2 100644 --- a/.nycrc.json +++ b/.nycrc.json @@ -4,7 +4,8 @@ "exclude": [ "**/lib/**/{fixture,*.spec.{js,mjs}}", ".*", - "**/packages/supertape/bin/*.mjs" + "**/packages/supertape/bin/*.mjs", + "**/*.config.*" ], "branches": 100, "lines": 100, diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..287b37b --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,6 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; +import {createESLintConfig, mergeESLintConfigs} from '@putout/eslint-flat'; + +const config = await mergeESLintConfigs('./packages'); + +export default createESLintConfig([safeAlign, config]); diff --git a/package.json b/package.json index 2f004d3..1769c9c 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,10 @@ "prepare": "madrun prepare" }, "devDependencies": { + "@putout/eslint-flat": "^1.0.4", "c8": "^9.0.0", "check-dts": "^0.7.0", - "eslint": "^8.5.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "husky": "^6.0.0", @@ -47,6 +48,8 @@ "engines": { "node": ">=18" }, - "workspaces": ["packages/*"], + "workspaces": [ + "packages/*" + ], "dependencies": {} } diff --git a/packages/engine-loader/.eslintrc.json b/packages/engine-loader/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/engine-loader/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/engine-loader/.npmignore b/packages/engine-loader/.npmignore index 0df6abf..a652acd 100644 --- a/packages/engine-loader/.npmignore +++ b/packages/engine-loader/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/engine-loader/.nycrc.json b/packages/engine-loader/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/engine-loader/.nycrc.json +++ b/packages/engine-loader/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/engine-loader/eslint.config.js b/packages/engine-loader/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/engine-loader/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/engine-loader/package.json b/packages/engine-loader/package.json index 7dbf9a2..4d7204a 100644 --- a/packages/engine-loader/package.json +++ b/packages/engine-loader/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@supertape/operator-stub": "*", "c8": "^9.0.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/formatter-fail/.eslintrc.json b/packages/formatter-fail/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/formatter-fail/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/formatter-fail/.npmignore b/packages/formatter-fail/.npmignore index 0df6abf..a652acd 100644 --- a/packages/formatter-fail/.npmignore +++ b/packages/formatter-fail/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/formatter-fail/.nycrc.json b/packages/formatter-fail/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/formatter-fail/.nycrc.json +++ b/packages/formatter-fail/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/formatter-fail/eslint.config.js b/packages/formatter-fail/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/formatter-fail/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/formatter-fail/package.json b/packages/formatter-fail/package.json index 3b1e348..b23e765 100644 --- a/packages/formatter-fail/package.json +++ b/packages/formatter-fail/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@babel/core": "^7.12.9", "c8": "^9.0.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/formatter-json-lines/.eslintrc.json b/packages/formatter-json-lines/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/formatter-json-lines/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/formatter-json-lines/.npmignore b/packages/formatter-json-lines/.npmignore index 0df6abf..a652acd 100644 --- a/packages/formatter-json-lines/.npmignore +++ b/packages/formatter-json-lines/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/formatter-json-lines/.nycrc.json b/packages/formatter-json-lines/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/formatter-json-lines/.nycrc.json +++ b/packages/formatter-json-lines/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/formatter-json-lines/eslint.config.js b/packages/formatter-json-lines/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/formatter-json-lines/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/formatter-json-lines/package.json b/packages/formatter-json-lines/package.json index 16593e8..9f6050b 100644 --- a/packages/formatter-json-lines/package.json +++ b/packages/formatter-json-lines/package.json @@ -32,7 +32,7 @@ ], "devDependencies": { "c8": "^9.0.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/formatter-progress-bar/.eslintrc.json b/packages/formatter-progress-bar/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/formatter-progress-bar/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/formatter-progress-bar/.npmignore b/packages/formatter-progress-bar/.npmignore index 0df6abf..a652acd 100644 --- a/packages/formatter-progress-bar/.npmignore +++ b/packages/formatter-progress-bar/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/formatter-progress-bar/.nycrc.json b/packages/formatter-progress-bar/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/formatter-progress-bar/.nycrc.json +++ b/packages/formatter-progress-bar/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/formatter-progress-bar/eslint.config.js b/packages/formatter-progress-bar/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/formatter-progress-bar/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/formatter-progress-bar/package.json b/packages/formatter-progress-bar/package.json index 3dc9512..6739bc4 100644 --- a/packages/formatter-progress-bar/package.json +++ b/packages/formatter-progress-bar/package.json @@ -36,7 +36,7 @@ ], "devDependencies": { "c8": "^9.0.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/formatter-short/.eslintrc.json b/packages/formatter-short/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/formatter-short/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/formatter-short/.npmignore b/packages/formatter-short/.npmignore index 0df6abf..a652acd 100644 --- a/packages/formatter-short/.npmignore +++ b/packages/formatter-short/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/formatter-short/.nycrc.json b/packages/formatter-short/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/formatter-short/.nycrc.json +++ b/packages/formatter-short/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/formatter-short/eslint.config.js b/packages/formatter-short/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/formatter-short/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/formatter-short/package.json b/packages/formatter-short/package.json index 37bf5cf..b41cff3 100644 --- a/packages/formatter-short/package.json +++ b/packages/formatter-short/package.json @@ -30,7 +30,7 @@ ], "devDependencies": { "c8": "^9.0.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/formatter-tap/.eslintrc.json b/packages/formatter-tap/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/formatter-tap/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/formatter-tap/.npmignore b/packages/formatter-tap/.npmignore index 0df6abf..a652acd 100644 --- a/packages/formatter-tap/.npmignore +++ b/packages/formatter-tap/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/formatter-tap/.nycrc.json b/packages/formatter-tap/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/formatter-tap/.nycrc.json +++ b/packages/formatter-tap/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/formatter-tap/eslint.config.js b/packages/formatter-tap/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/formatter-tap/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/formatter-tap/package.json b/packages/formatter-tap/package.json index a0b50ca..e6f7397 100644 --- a/packages/formatter-tap/package.json +++ b/packages/formatter-tap/package.json @@ -30,7 +30,7 @@ ], "devDependencies": { "c8": "^9.0.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/formatter-time/.eslintrc.json b/packages/formatter-time/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/formatter-time/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/formatter-time/.npmignore b/packages/formatter-time/.npmignore index 0df6abf..a652acd 100644 --- a/packages/formatter-time/.npmignore +++ b/packages/formatter-time/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/formatter-time/.nycrc.json b/packages/formatter-time/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/formatter-time/.nycrc.json +++ b/packages/formatter-time/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/formatter-time/eslint.config.js b/packages/formatter-time/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/formatter-time/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/formatter-time/package.json b/packages/formatter-time/package.json index 691f8e8..fc61a48 100644 --- a/packages/formatter-time/package.json +++ b/packages/formatter-time/package.json @@ -37,7 +37,7 @@ ], "devDependencies": { "c8": "^9.0.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/operator-stub/.eslintrc.json b/packages/operator-stub/.eslintrc.json deleted file mode 100644 index c182222..0000000 --- a/packages/operator-stub/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "plugin:n/recommended", - "plugin:putout/recommended" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/operator-stub/.npmignore b/packages/operator-stub/.npmignore index 0df6abf..a652acd 100644 --- a/packages/operator-stub/.npmignore +++ b/packages/operator-stub/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/operator-stub/.nycrc.json b/packages/operator-stub/.nycrc.json index 9242a55..c60338a 100644 --- a/packages/operator-stub/.nycrc.json +++ b/packages/operator-stub/.nycrc.json @@ -1,7 +1,11 @@ { "check-coverage": true, "all": true, - "exclude": [".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}"], + "exclude": [ + ".*", + "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", + "**/*.config.*" + ], "branches": 100, "lines": 100, "functions": 100, diff --git a/packages/operator-stub/eslint.config.js b/packages/operator-stub/eslint.config.js new file mode 100644 index 0000000..ea90e3c --- /dev/null +++ b/packages/operator-stub/eslint.config.js @@ -0,0 +1,3 @@ +import {safeAlign} from 'eslint-plugin-putout/config'; + +export default safeAlign; diff --git a/packages/operator-stub/package.json b/packages/operator-stub/package.json index c984621..d69ecb8 100644 --- a/packages/operator-stub/package.json +++ b/packages/operator-stub/package.json @@ -39,7 +39,7 @@ "devDependencies": { "c8": "^9.0.0", "check-dts": "^0.7.0", - "eslint": "^8.0.0-beta.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "madrun": "^10.0.0", diff --git a/packages/supertape/.eslintrc.json b/packages/supertape/.eslintrc.json deleted file mode 100644 index acdb5a5..0000000 --- a/packages/supertape/.eslintrc.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "overrides": [{ - "files": "*.d.ts", - "rules": { - "no-var": "off" - } - }, { - "files": "*.spec.*", - "rules": { - "node/no-extraneous-import": "off" - } - }], - "extends": [ - "plugin:n/recommended", - "plugin:putout/safe+align" - ], - "plugins": [ - "n", - "putout" - ] -} diff --git a/packages/supertape/.npmignore b/packages/supertape/.npmignore index a7b63c0..0bf9301 100644 --- a/packages/supertape/.npmignore +++ b/packages/supertape/.npmignore @@ -6,3 +6,4 @@ coverage fixture +*.config.* diff --git a/packages/supertape/.nycrc.json b/packages/supertape/.nycrc.json index dbed622..c5c7bc6 100644 --- a/packages/supertape/.nycrc.json +++ b/packages/supertape/.nycrc.json @@ -4,7 +4,8 @@ "exclude": [ ".*", "{bin,lib}/**/{fixture,*.spec.{js,mjs}}", - "bin/**/*.mjs" + "bin/**/*.mjs", + "**/*.config.*" ], "branches": 100, "lines": 100, diff --git a/packages/supertape/eslint.config.js b/packages/supertape/eslint.config.js new file mode 100644 index 0000000..9cd4f88 --- /dev/null +++ b/packages/supertape/eslint.config.js @@ -0,0 +1,20 @@ +'use strict'; + +const {safeAlign} = require('eslint-plugin-putout/config'); +const {matchToFlat} = require('@putout/eslint-flat'); + +const match = { + '*.d.ts': { + 'no-var': 'off', + }, + '*.spec.*': { + 'node/no-extraneous-import': 'off', + }, +}; + +module.exports = [ + ...safeAlign, + ...matchToFlat(match), +]; + +module.exports.match = match; diff --git a/packages/supertape/lib/cli.js b/packages/supertape/lib/cli.js index c2628f2..90e775d 100644 --- a/packages/supertape/lib/cli.js +++ b/packages/supertape/lib/cli.js @@ -10,7 +10,6 @@ const fullstore = require('fullstore'); const tryToCatch = require('try-to-catch'); const keypress = require('@putout/cli-keypress'); -const {simpleImport} = require('./simple-import'); const {parseArgs, yargsOptions} = require('./cli/parse-args'); const supertape = require('..'); @@ -145,7 +144,7 @@ async function cli({argv, cwd, stdout, isStop, workerFormatter}) { } for (const resolved of resolvedNames) { - promises.push(simpleImport(resolved)); + promises.push(import(resolved)); } filesCount(files.length); @@ -157,7 +156,7 @@ async function cli({argv, cwd, stdout, isStop, workerFormatter}) { if (importError) for (const resolved of resolvedNames) - await simpleImport(resolved); + await import(resolved); const [result] = await once(supertape.run(), 'end'); diff --git a/packages/supertape/lib/simple-import.js b/packages/supertape/lib/simple-import.js deleted file mode 100644 index 109c7ec..0000000 --- a/packages/supertape/lib/simple-import.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports.simpleImport = (a) => import(a); diff --git a/packages/supertape/package.json b/packages/supertape/package.json index 1799346..f7dd57c 100644 --- a/packages/supertape/package.json +++ b/packages/supertape/package.json @@ -75,10 +75,11 @@ "devDependencies": { "@babel/core": "^8.0.0-alpha.5", "@iocmd/wait": "^2.1.0", + "@putout/eslint-flat": "^1.0.4", "c8": "^9.0.0", "check-dts": "^0.7.0", "currify": "^4.0.0", - "eslint": "^8.0.0", + "eslint": "^9.1.1", "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "find-up": "^7.0.0",