-
-
Couldn't load subscription status.
- Fork 7
feat: migrate to FlatConfig
#64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
e2ddf6a
4081284
8f8ca80
f7dce14
99f6137
c622c60
ebd3aae
56eedec
2de9ebd
8c14a72
eec30e9
47d7f34
40723c8
3194fff
53a002e
69f9bdb
0544bdd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,18 +15,26 @@ | |
| "ts.js", | ||
| "ts-test.js" | ||
| ], | ||
| "exports": { | ||
| "./eslint": "./eslint.js", | ||
| "./test": "./test.js", | ||
| "./ts": "./ts.js", | ||
| "./ts-test": "./ts-test.js" | ||
| }, | ||
| "author": "Tommy Chen <[email protected]> (http://zespia.tw)", | ||
| "maintainers": [ | ||
| "Abner Chou <[email protected]> (http://abnerchou.me)" | ||
| ], | ||
| "license": "MIT", | ||
| "peerDependencies": { | ||
| "eslint": ">= 8.23.0" | ||
| "eslint": ">= 9.13.0" | ||
| }, | ||
| "dependencies": { | ||
| "eslint-plugin-n": "^17.9.0", | ||
| "@typescript-eslint/eslint-plugin": "^7.15.0", | ||
| "@typescript-eslint/parser": "^7.15.0" | ||
| "@eslint/js": "^9.13.0", | ||
| "eslint-plugin-n": "^17.12.0", | ||
| "globals": "^15.11.0", | ||
| "typescript-eslint": "^8.12.2", | ||
| "eslint-plugin-mocha": "^10.5.0" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,29 @@ | ||
| module.exports = { | ||
| extends: './eslint.js', | ||
| const eslint = require('./eslint.js'); | ||
|
||
| const globals = require('globals'); | ||
| const mochaPlugin = require('eslint-plugin-mocha'); | ||
|
|
||
| const testConfig = { | ||
| languageOptions: { | ||
| globals: { | ||
| ...globals.mocha | ||
| }, | ||
| }, | ||
| rules: { | ||
| 'no-unused-expressions': 'off' | ||
| }, | ||
| env: { | ||
| mocha: true | ||
| }; | ||
|
|
||
| const mochaConfig = { | ||
| ...mochaPlugin.configs.flat.recommended, | ||
| rules: { | ||
|
||
| "mocha/no-mocha-arrows": 0, | ||
| "mocha/handle-done-callback": 0, | ||
| "mocha/max-top-level-suites": 0, | ||
| } | ||
| }; | ||
|
|
||
| module.exports = [ | ||
| ...eslint, | ||
| testConfig, | ||
| mochaConfig, | ||
| ]; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,18 @@ | ||
| module.exports = { | ||
| extends: './ts.js', | ||
| const tsJs = require('./ts.js'); | ||
| const globals = require('globals'); | ||
|
|
||
| const tsTestConfig = { | ||
| languageOptions: { | ||
| globals: { | ||
| ...globals.mocha | ||
| }, | ||
| }, | ||
| rules: { | ||
| 'no-unused-expressions': 'off' | ||
| }, | ||
| env: { | ||
| mocha: true | ||
| } | ||
| }; | ||
|
|
||
| module.exports = [ | ||
| ...tsJs, | ||
| tsTestConfig, | ||
| ]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,17 @@ | ||
| module.exports = { | ||
| parser: '@typescript-eslint/parser', | ||
| plugins: ['@typescript-eslint'], | ||
| extends: [ | ||
| './eslint.js', | ||
| 'plugin:@typescript-eslint/recommended' | ||
| ], | ||
| const tseslint = require('typescript-eslint'); | ||
| const nodePlugin = require('eslint-plugin-n'); | ||
| const eslint = require('./eslint.js'); | ||
|
|
||
| const nodeConfig = { | ||
| rules: { | ||
| 'n/no-unsupported-features/es-syntax': ['error', { 'ignores': ['modules'] }], | ||
| 'n/no-missing-import': ['error', { 'tryExtensions': ['.js', '.ts'] }] | ||
| } | ||
| }; | ||
| }, | ||
| } | ||
|
|
||
| module.exports = [].concat( | ||
| eslint, | ||
| nodePlugin.configs["flat/mixed-esm-and-cjs"], | ||
| ...tseslint.configs.recommended, | ||
| nodeConfig, | ||
| ); |
Uh oh!
There was an error while loading. Please reload this page.