.eslintrc.cjs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // eslint-disable-next-line no-undef
  2. module.exports = {
  3. env: {
  4. browser: true,
  5. es6: true,
  6. },
  7. ignorePatterns: [
  8. "*.map",
  9. "dist/**",
  10. ],
  11. extends: [
  12. "eslint:recommended",
  13. "plugin:@typescript-eslint/recommended",
  14. ],
  15. globals: {
  16. Atomics: "readonly",
  17. SharedArrayBuffer: "readonly",
  18. GM: "readonly",
  19. unsafeWindow: "writable",
  20. },
  21. parser: "@typescript-eslint/parser",
  22. parserOptions: {
  23. ecmaVersion: "latest",
  24. },
  25. plugins: [
  26. "@typescript-eslint",
  27. ],
  28. rules: {
  29. "no-unreachable": "off",
  30. "quotes": [ "error", "double" ],
  31. "semi": [ "error", "always" ],
  32. "eol-last": [ "error", "always" ],
  33. "no-async-promise-executor": "off",
  34. "indent": ["error", 2, { "ignoredNodes": ["VariableDeclaration[declarations.length=0]"] }],
  35. "@typescript-eslint/no-non-null-assertion": "off",
  36. "@typescript-eslint/no-unused-vars": ["warn", { "ignoreRestSiblings": true, "argsIgnorePattern": "^_" }],
  37. "@typescript-eslint/ban-ts-comment": "off",
  38. "comma-dangle": ["error", "only-multiline"],
  39. "no-misleading-character-class": "off",
  40. },
  41. };