Skip to content

Commit

Permalink
chore: dogfooding the new config
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Apr 21, 2023
1 parent 4e0bb44 commit 09ac7f8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
@@ -1,5 +1,7 @@
/**
* @author Toru Nagashima
* @deprecated
* @description the file is no longer used, and will be removed in the future.
* See LICENSE file in root directory for full license.
*/
"use strict"
Expand Down
2 changes: 1 addition & 1 deletion configs/recommended-script.js
Expand Up @@ -9,6 +9,6 @@ const { configs, rules } = require("../lib/index.js")

module.exports = {
plugins: { n: { rules } },
languageOptions: { sourceType: "script" },
languageOptions: { sourceType: "commonjs" },
rules: configs["recommended-script"].rules,
}
29 changes: 29 additions & 0 deletions eslint.config.js
@@ -0,0 +1,29 @@
/**
* @author 唯然<weiran.zsd@outlook.com>
*/
"use strict"

const js = require('@eslint/js');
const { FlatCompat } = require('@eslint/eslintrc');
const globals = require('globals');
const nodeRecommended = require('eslint-plugin-n/configs/recommended-script')

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});

module.exports = [
...compat.extends(
"eslint:recommended",
"plugin:eslint-plugin/recommended",
"prettier",
),
nodeRecommended,
{
languageOptions: {
globals: globals.mocha
}
}

];
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -14,16 +14,18 @@
"eslint": ">=7.0.0"
},
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"builtins": "^5.0.1",
"eslint-plugin-es-x": "^6.1.0",
"@eslint-community/eslint-utils": "^4.4.0",
"ignore": "^5.1.1",
"is-core-module": "^2.12.0",
"minimatch": "^3.1.2",
"resolve": "^1.22.2",
"semver": "^7.5.0"
},
"devDependencies": {
"@eslint/eslintrc": "^2.0.2",
"@eslint/js": "^8.38.0",
"@typescript-eslint/parser": "^5.59.0",
"codecov": "^3.3.0",
"esbuild": "^0.17.17",
Expand Down

0 comments on commit 09ac7f8

Please sign in to comment.