@abyssalfragments/linter-config 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +41 -41
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import js from "@eslint/js";
2
+ import ts from "typescript-eslint";
2
3
  import unusedImports from "eslint-plugin-unused-imports";
3
4
  import globals from "globals";
4
- import tseslint from "typescript-eslint";
5
5
  import { defineConfig, globalIgnores } from "eslint/config";
6
6
  import header from "eslint-plugin-simple-header";
7
7
  import eslintConfigPrettier from "eslint-config-prettier/flat";
@@ -31,47 +31,47 @@ const sharedIgnores = [
31
31
  // src/eslint.ts
32
32
  const defaultConfig$1 = Object.freeze({});
33
33
  function eslint(config = defaultConfig$1) {
34
- return defineConfig([
35
- globalIgnores([...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((i) => `${i}/*`)]),
36
- tseslint.configs.recommended,
37
- {
38
- files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
39
- plugins: {
40
- js,
41
- "unused-imports": unusedImports,
42
- header
43
- },
44
- extends: [js.configs.recommended, eslintConfigPrettier],
45
- languageOptions: { globals: {
46
- ...globals.node,
47
- ...globals.nodeBuiltin
48
- } },
49
- rules: {
50
- ...config.license ? { "header/header": ["error", "file" in config.license ? { files: [config.license.file] } : { text: "shared" in config.license ? Licenses[config.license.shared] : config.license.text }] } : {},
51
- "no-undef": "off",
52
- "no-redeclare": "off",
53
- "@typescript-eslint/no-redeclare": "error",
54
- "unused-imports/no-unused-imports": "error",
55
- "no-unused-vars": "off",
56
- "@typescript-eslint/no-unused-vars": "off",
57
- "unused-imports/no-unused-vars": ["warn", {
58
- vars: "all",
59
- varsIgnorePattern: "^_",
60
- args: "after-used",
61
- argsIgnorePattern: "^_"
62
- }],
63
- "no-restricted-imports": ["error", { paths: [{
64
- name: "discord.js",
65
- importNames: ["Colors"],
66
- message: "Use StyledColors instead"
67
- }] }],
68
- "no-restricted-syntax": ["error", {
69
- selector: "Literal[raw=/^0x/i]",
70
- message: "Use StyledColors instead"
71
- }]
72
- }
34
+ return defineConfig([globalIgnores([...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((i) => `${i}/*`)]), {
35
+ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
36
+ plugins: {
37
+ js,
38
+ "unused-imports": unusedImports,
39
+ header
40
+ },
41
+ extends: [
42
+ js.configs.recommended,
43
+ eslintConfigPrettier,
44
+ ts.configs.recommended
45
+ ],
46
+ languageOptions: { globals: {
47
+ ...globals.node,
48
+ ...globals.nodeBuiltin
49
+ } },
50
+ rules: {
51
+ ...config.license ? { "header/header": ["error", "file" in config.license ? { files: [config.license.file] } : { text: "shared" in config.license ? Licenses[config.license.shared] : config.license.text }] } : {},
52
+ "no-undef": "off",
53
+ "no-redeclare": "off",
54
+ "@typescript-eslint/no-redeclare": "error",
55
+ "unused-imports/no-unused-imports": "error",
56
+ "no-unused-vars": "off",
57
+ "@typescript-eslint/no-unused-vars": "off",
58
+ "unused-imports/no-unused-vars": ["warn", {
59
+ vars: "all",
60
+ varsIgnorePattern: "^_",
61
+ args: "after-used",
62
+ argsIgnorePattern: "^_"
63
+ }],
64
+ "no-restricted-imports": ["error", { paths: [{
65
+ name: "discord.js",
66
+ importNames: ["Colors"],
67
+ message: "Use StyledColors instead"
68
+ }] }],
69
+ "no-restricted-syntax": ["error", {
70
+ selector: "Literal[raw=/^0x/i]",
71
+ message: "Use StyledColors instead"
72
+ }]
73
73
  }
74
- ]);
74
+ }]);
75
75
  }
76
76
  // src/oxfmt.ts
77
77
  const defaultConfig = Object.freeze({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyssalfragments/linter-config",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Abyssal Fragments shared linter config (eslint, prettier, etc)",
5
5
  "bugs": {
6
6
  "url": "https://git.abyssalfragments.org/packages/linter-config/issues"