@saasmakers/eslint 1.0.21 → 1.0.22

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.
@@ -2,6 +2,7 @@
2
2
 
3
3
  const antfu = require('@antfu/eslint-config');
4
4
  const saasmakers = require('@saasmakers/eslint');
5
+ const shared = require('@saasmakers/shared');
5
6
  const vitest = require('@vitest/eslint-plugin');
6
7
  const packageJson = require('eslint-plugin-package-json');
7
8
  const index$1 = require('./shared/eslint.BqRQ4tAN.cjs');
@@ -10869,7 +10870,7 @@ const eslint_config = antfu__default(
10869
10870
  rules: {
10870
10871
  "saasmakers/ts-format-layout": "error",
10871
10872
  "saasmakers/ts-format-tests": "error",
10872
- "saasmakers/vue-format-i18n": "error",
10873
+ "saasmakers/vue-format-i18n": ["error", { locales: shared.localeCodes }],
10873
10874
  "saasmakers/vue-format-script": "error",
10874
10875
  "saasmakers/vue-format-template": "error"
10875
10876
  }
@@ -1,5 +1,6 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
+ import { localeCodes } from '@saasmakers/shared';
3
4
  import vitest from '@vitest/eslint-plugin';
4
5
  import packageJson from 'eslint-plugin-package-json';
5
6
  import { Linter, ESLint } from 'eslint';
@@ -149,7 +150,7 @@ var eslint_config = antfu(
149
150
  rules: {
150
151
  "saasmakers/ts-format-layout": "error",
151
152
  "saasmakers/ts-format-tests": "error",
152
- "saasmakers/vue-format-i18n": "error",
153
+ "saasmakers/vue-format-i18n": ["error", { locales: localeCodes }],
153
154
  "saasmakers/vue-format-script": "error",
154
155
  "saasmakers/vue-format-template": "error"
155
156
  }
@@ -1,5 +1,6 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
+ import { localeCodes } from '@saasmakers/shared';
3
4
  import vitest from '@vitest/eslint-plugin';
4
5
  import packageJson from 'eslint-plugin-package-json';
5
6
  import { Linter, ESLint } from 'eslint';
@@ -149,7 +150,7 @@ var eslint_config = antfu(
149
150
  rules: {
150
151
  "saasmakers/ts-format-layout": "error",
151
152
  "saasmakers/ts-format-tests": "error",
152
- "saasmakers/vue-format-i18n": "error",
153
+ "saasmakers/vue-format-i18n": ["error", { locales: localeCodes }],
153
154
  "saasmakers/vue-format-script": "error",
154
155
  "saasmakers/vue-format-template": "error"
155
156
  }
@@ -1,5 +1,6 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
+ import { localeCodes } from '@saasmakers/shared';
3
4
  import vitest from '@vitest/eslint-plugin';
4
5
  import packageJson from 'eslint-plugin-package-json';
5
6
  import { Linter, ESLint } from 'eslint';
@@ -149,7 +150,7 @@ var eslint_config = antfu(
149
150
  rules: {
150
151
  "saasmakers/ts-format-layout": "error",
151
152
  "saasmakers/ts-format-tests": "error",
152
- "saasmakers/vue-format-i18n": "error",
153
+ "saasmakers/vue-format-i18n": ["error", { locales: localeCodes }],
153
154
  "saasmakers/vue-format-script": "error",
154
155
  "saasmakers/vue-format-template": "error"
155
156
  }
@@ -1,5 +1,6 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
+ import { localeCodes } from '@saasmakers/shared';
3
4
  import vitest from '@vitest/eslint-plugin';
4
5
  import packageJson from 'eslint-plugin-package-json';
5
6
  import { d as distExports } from './shared/eslint.DOaqyhfZ.mjs';
@@ -10843,7 +10844,7 @@ const eslint_config = antfu(
10843
10844
  rules: {
10844
10845
  "saasmakers/ts-format-layout": "error",
10845
10846
  "saasmakers/ts-format-tests": "error",
10846
- "saasmakers/vue-format-i18n": "error",
10847
+ "saasmakers/vue-format-i18n": ["error", { locales: localeCodes }],
10847
10848
  "saasmakers/vue-format-script": "error",
10848
10849
  "saasmakers/vue-format-template": "error"
10849
10850
  }
package/dist/index.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index$1 = require('./shared/eslint.BqRQ4tAN.cjs');
4
+ const shared = require('@saasmakers/shared');
4
5
  require('eslint');
5
6
  require('eslint/use-at-your-own-risk');
6
7
 
@@ -281,6 +282,9 @@ const rule$4 = {
281
282
  type: "layout"
282
283
  },
283
284
  create(context) {
285
+ if (context.filename.endsWith(".d.ts")) {
286
+ return {};
287
+ }
284
288
  const sourceCode = context.sourceCode;
285
289
  const maxCharacters = context.options[0]?.maxCharacters ?? defaultMaxCharacters;
286
290
  const maxLineLength = context.options[0]?.maxLineLength ?? defaultMaxLineLength;
@@ -515,7 +519,7 @@ const rule$3 = {
515
519
  }
516
520
  };
517
521
 
518
- const defaultLocales = ["en", "fr"];
522
+ const defaultLocales = shared.localeCodes;
519
523
  const indentSpaces = 2;
520
524
  const i18nRegex = /(<i18n\s+lang=["']json["']>)([\s\S]*?)<\/i18n>/i;
521
525
  const templateRegex$1 = /<template>([\s\S]*)<\/template>/i;
package/dist/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import { d as distExports } from './shared/eslint.DOaqyhfZ.mjs';
2
+ import { localeCodes } from '@saasmakers/shared';
2
3
  import 'eslint';
3
4
  import 'eslint/use-at-your-own-risk';
4
5
 
@@ -279,6 +280,9 @@ const rule$4 = {
279
280
  type: "layout"
280
281
  },
281
282
  create(context) {
283
+ if (context.filename.endsWith(".d.ts")) {
284
+ return {};
285
+ }
282
286
  const sourceCode = context.sourceCode;
283
287
  const maxCharacters = context.options[0]?.maxCharacters ?? defaultMaxCharacters;
284
288
  const maxLineLength = context.options[0]?.maxLineLength ?? defaultMaxLineLength;
@@ -513,7 +517,7 @@ const rule$3 = {
513
517
  }
514
518
  };
515
519
 
516
- const defaultLocales = ["en", "fr"];
520
+ const defaultLocales = localeCodes;
517
521
  const indentSpaces = 2;
518
522
  const i18nRegex = /(<i18n\s+lang=["']json["']>)([\s\S]*?)<\/i18n>/i;
519
523
  const templateRegex$1 = /<template>([\s\S]*)<\/template>/i;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/eslint",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "private": false,
5
5
  "description": "Shared ESLint config and rules for SaaS Makers projects",
6
6
  "license": "MIT",
@@ -27,6 +27,7 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@antfu/eslint-config": "7.4.3",
30
+ "@saasmakers/shared": "0.2.8",
30
31
  "@unocss/eslint-plugin": "66.7.0",
31
32
  "@vitest/eslint-plugin": "1.6.20",
32
33
  "eslint-plugin-package-json": "0.31.0",