Skip to content

Commit

Permalink
chore: update eslint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed May 15, 2023
1 parent fdfdae4 commit c644fec
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -149,7 +149,7 @@ These preset configs:
- A: See [context.getFilename() in rule returns relative path](https://github.com/roadhump/SublimeLinter-eslint#contextgetfilename-in-rule-returns-relative-path) in the SublimeLinter-eslint FAQ.

- Q: How to use the new eslint config with mixed commonjs and es modules?
- A: The `recommended` config is no longer exported. You can create a config based on `recommended-script` and `recommended-module`.
- A: The `recommended` config is no longer exported. You can create a config based on `recommended-script` and `recommended-module`. An example:

```js
const nodeRecommendedScript = require("eslint-plugin-n/configs/recommended-script");
Expand Down
18 changes: 17 additions & 1 deletion eslint.config.js
Expand Up @@ -18,8 +18,24 @@ module.exports = [
languageOptions: { globals: globals.mocha },
linterOptions: { reportUnusedDisableDirectives: true },
},
{ ignores: [".nyc_output/", "coverage/", "docs/", "lib/converted-esm/"] },
{
ignores: [
".nyc_output/",
"coverage/",
"docs/",
"lib/converted-esm/",
"test/fixtures/",
],
},
js.configs.recommended,
nodeRecommended,
...compat.extends("plugin:eslint-plugin/recommended", "prettier"),
{ rules: { "eslint-plugin/require-meta-docs-description": "error" } },
{
// these messageIds were used outside
files: ["lib/rules/prefer-global/*.js"],
rules: {
"eslint-plugin/no-unused-message-ids": 0,
},
},
]

0 comments on commit c644fec

Please sign in to comment.