@abyssalfragments/linter-config 1.2.0 → 1.3.0

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.
package/dist/index.d.mts CHANGED
@@ -24,5 +24,7 @@ declare function oxfmt(config?: OxfmtConfig): {
24
24
  ignorePatterns: string[];
25
25
  tabWidth: number;
26
26
  useTabs: boolean | undefined;
27
+ astro: true;
28
+ svelte: true;
27
29
  };
28
30
  export { eslint, oxfmt };
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({});
@@ -79,7 +79,9 @@ function oxfmt(config = defaultConfig) {
79
79
  return defineConfig$1({
80
80
  ignorePatterns: [...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((i) => `${i}/**/*`)],
81
81
  tabWidth: config.rumiMode ? 4 : 2,
82
- useTabs: config.rumiMode
82
+ useTabs: config.rumiMode,
83
+ astro: true,
84
+ svelte: true
83
85
  });
84
86
  }
85
87
  export { SharedLicense, eslint, oxfmt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyssalfragments/linter-config",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
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"
@@ -48,7 +48,17 @@
48
48
  "typescript": "6.0.3"
49
49
  },
50
50
  "peerDependencies": {
51
+ "@astrojs/compiler-rs": "^0.5.0",
51
52
  "eslint": "^10.0.0",
52
- "oxfmt": "^0.78.0"
53
+ "oxfmt": "^0.78.0",
54
+ "svelte": "^5.0.0"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "@astrojs/compiler-rs": {
58
+ "optional": true
59
+ },
60
+ "svelte": {
61
+ "optional": true
62
+ }
53
63
  }
54
64
  }