r-util-js/.eslintrc.js

41 lines
925 B
JavaScript
Raw Normal View History

// 配置参考https://eslint.bootcss.com/docs/user-guide/configuring
// import { defineConfig } from 'eslint-define-config';
const { defineConfig } = require("eslint-define-config");
module.exports = defineConfig({
root: true,
env: {
node: true,
browser: true,
},
2023-04-20 17:38:14 +08:00
globals: {},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
impliedStrict: true,
},
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)",
],
env: {
mocha: true,
jest: true,
},
},
],
});