Skip to content

Commit

Permalink
feat: add name to flat configs
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Apr 8, 2024
1 parent 1419c46 commit 1ae6865
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/configs/recommended-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports.eslintrc = {
* @type {import('eslint').Linter.FlatConfig}
*/
module.exports.flat = {
name: "node/flat/recommended-module",
languageOptions: {
sourceType: "module",
globals: {
Expand Down
1 change: 1 addition & 0 deletions lib/configs/recommended-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports.eslintrc = {
* @type {import('eslint').Linter.FlatConfig}
*/
module.exports.flat = {
name: "node/flat/recommended-script",
languageOptions: {
sourceType: "commonjs",
globals: {
Expand Down
1 change: 1 addition & 0 deletions lib/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const recommendedConfig = isModule ? moduleConfig : scriptConfig
* @type {import('eslint').ESLint.ConfigData}
*/
module.exports.eslintrc = {
name: "node/flat/recommended",

Check failure on line 21 in lib/configs/recommended.js

View workflow job for this annotation

GitHub Actions / Lint

Object literal may only specify known properties, and 'name' does not exist in type 'ConfigData<RulesRecord>'.
...recommendedConfig.eslintrc,
overrides: [
{ files: ["*.cjs", ".*.cjs"], ...scriptConfig.eslintrc },
Expand Down

0 comments on commit 1ae6865

Please sign in to comment.