UNPKG

@tangany/eslint-config

Version:
34 lines (29 loc) 930 B
import confusingBrowserGlobals from "confusing-browser-globals"; import TSESLint from "typescript-eslint"; export default TSESLint.config( { rules: { // Disallow labels with same names as variables "no-label-var": "error", // Restrict certain globals "no-restricted-globals": [ "error", { name: "isFinite", message: "Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite", }, { name: "isNaN", message: "Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan", }, ...confusingBrowserGlobals, ], // Prevent use of undefined in variable initialization "no-undef-init": "error", // Allow use of undefined as a variable (optional, based on preference) "no-undefined": "off", }, }, );