Skip to content
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

refactor: use flat config for eslint #201

Merged
merged 4 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

32 changes: 0 additions & 32 deletions .eslintrc.js

This file was deleted.

43 changes: 43 additions & 0 deletions eslint.config.js
@@ -0,0 +1,43 @@
"use strict";

const eslintConfigESLint = require("eslint-config-eslint");
kecrily marked this conversation as resolved.
Show resolved Hide resolved
const globals = require("globals");

module.exports = [
...eslintConfigESLint,
kecrily marked this conversation as resolved.
Show resolved Hide resolved
{
languageOptions: {
sourceType: "commonjs",
ecmaVersion: 2018,
globals: {
...globals.node,
...globals.es2015
kecrily marked this conversation as resolved.
Show resolved Hide resolved
}
},
kecrily marked this conversation as resolved.
Show resolved Hide resolved
rules: {
camelcase: ["error", { properties: "never" }],

// Remove after https://github.com/eslint/eslint/pull/17900 is included in new release
"jsdoc/no-multi-asterisks": ["error", { allowWhitespace: true }]
}
},
{
files: ["eslint.config.js", "tests/**/*.js"],
languageOptions: {
globals: {
...globals.jest
}
},
rules: {
"n/no-unpublished-require": "off",
"n/no-extraneous-require": [
"error",
{
allowModules: [
"@octokit/rest"
]
}
]
}
}
];