@saasmakers/eslint 0.1.5 → 0.1.7

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.
@@ -1,14 +1,18 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  const antfu = require('@antfu/eslint-config');
4
6
  const saasmakers = require('@saasmakers/eslint');
5
7
  const packageJson = require('eslint-plugin-package-json');
8
+ const storybook = require('eslint-plugin-storybook');
6
9
 
7
10
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
8
11
 
9
12
  const antfu__default = /*#__PURE__*/_interopDefaultCompat(antfu);
10
13
  const saasmakers__default = /*#__PURE__*/_interopDefaultCompat(saasmakers);
11
14
  const packageJson__default = /*#__PURE__*/_interopDefaultCompat(packageJson);
15
+ const storybook__default = /*#__PURE__*/_interopDefaultCompat(storybook);
12
16
 
13
17
  const eslint_config = antfu__default(
14
18
  {
@@ -40,7 +44,8 @@ const eslint_config = antfu__default(
40
44
  },
41
45
  plugins: {
42
46
  "package-json": packageJson__default,
43
- saasmakers: saasmakers__default
47
+ saasmakers: saasmakers__default,
48
+ storybook: storybook__default
44
49
  },
45
50
  rules: {
46
51
  "array-bracket-newline": [
@@ -284,4 +289,4 @@ const eslint_config = antfu__default(
284
289
  }
285
290
  );
286
291
 
287
- module.exports = eslint_config;
292
+ exports.default = eslint_config;
@@ -1,6 +1,7 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
3
  import packageJson from 'eslint-plugin-package-json';
4
+ import storybook from 'eslint-plugin-storybook';
4
5
 
5
6
  var eslint_config = antfu(
6
7
  {
@@ -32,7 +33,8 @@ var eslint_config = antfu(
32
33
  },
33
34
  plugins: {
34
35
  "package-json": packageJson,
35
- saasmakers
36
+ saasmakers,
37
+ storybook
36
38
  },
37
39
  rules: {
38
40
  "array-bracket-newline": [
@@ -1,6 +1,7 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
3
  import packageJson from 'eslint-plugin-package-json';
4
+ import storybook from 'eslint-plugin-storybook';
4
5
 
5
6
  var eslint_config = antfu(
6
7
  {
@@ -32,7 +33,8 @@ var eslint_config = antfu(
32
33
  },
33
34
  plugins: {
34
35
  "package-json": packageJson,
35
- saasmakers
36
+ saasmakers,
37
+ storybook
36
38
  },
37
39
  rules: {
38
40
  "array-bracket-newline": [
@@ -1,6 +1,7 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
3
  import packageJson from 'eslint-plugin-package-json';
4
+ import storybook from 'eslint-plugin-storybook';
4
5
 
5
6
  var eslint_config = antfu(
6
7
  {
@@ -32,7 +33,8 @@ var eslint_config = antfu(
32
33
  },
33
34
  plugins: {
34
35
  "package-json": packageJson,
35
- saasmakers
36
+ saasmakers,
37
+ storybook
36
38
  },
37
39
  rules: {
38
40
  "array-bracket-newline": [
@@ -1,6 +1,7 @@
1
1
  import antfu from '@antfu/eslint-config';
2
2
  import saasmakers from '@saasmakers/eslint';
3
3
  import packageJson from 'eslint-plugin-package-json';
4
+ import storybook from 'eslint-plugin-storybook';
4
5
 
5
6
  const eslint_config = antfu(
6
7
  {
@@ -32,7 +33,8 @@ const eslint_config = antfu(
32
33
  },
33
34
  plugins: {
34
35
  "package-json": packageJson,
35
- saasmakers
36
+ saasmakers,
37
+ storybook
36
38
  },
37
39
  rules: {
38
40
  "array-bracket-newline": [
package/dist/index.cjs CHANGED
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  const utils = require('@typescript-eslint/utils');
4
6
 
5
7
  const rule$e = {
@@ -135,11 +137,11 @@ const rule$c = {
135
137
  meta: {
136
138
  docs: {
137
139
  category: "Best Practices",
138
- description: "Enforce sorted test functions grouped by method with sorted exceptions and middlewares",
140
+ description: "Enforce sorted test functions grouped by method with sorted errors, exceptions and middlewares",
139
141
  recommended: true
140
142
  },
141
143
  fixable: "code",
142
- messages: { sortError: "Test functions should be grouped by method with sorted exceptions and middlewares." },
144
+ messages: { sortError: "Test functions should be grouped by method with sorted errors, exceptions and middlewares." },
143
145
  schema: [],
144
146
  type: "suggestion"
145
147
  },
@@ -155,9 +157,12 @@ const rule$c = {
155
157
  }
156
158
  function getTestPriority(testName) {
157
159
  if (testName.includes(".middlewares.")) {
158
- return 3;
160
+ return 4;
159
161
  }
160
162
  if (testName.includes(".exceptions.")) {
163
+ return 3;
164
+ }
165
+ if (testName.includes(".errors.")) {
161
166
  return 2;
162
167
  }
163
168
  return 1;
@@ -169,7 +174,7 @@ const rule$c = {
169
174
  function getSpecificName(testName) {
170
175
  const parts = testName.split(".");
171
176
  const specialIndex = parts.findIndex(
172
- (part) => part === "exceptions" || part === "middlewares"
177
+ (part) => part === "errors" || part === "exceptions" || part === "middlewares"
173
178
  );
174
179
  if (specialIndex === -1) {
175
180
  return parts.slice(2).join(".");
@@ -1157,4 +1162,4 @@ const index = {
1157
1162
  }
1158
1163
  };
1159
1164
 
1160
- module.exports = index;
1165
+ exports.default = index;
package/dist/index.mjs CHANGED
@@ -133,11 +133,11 @@ const rule$c = {
133
133
  meta: {
134
134
  docs: {
135
135
  category: "Best Practices",
136
- description: "Enforce sorted test functions grouped by method with sorted exceptions and middlewares",
136
+ description: "Enforce sorted test functions grouped by method with sorted errors, exceptions and middlewares",
137
137
  recommended: true
138
138
  },
139
139
  fixable: "code",
140
- messages: { sortError: "Test functions should be grouped by method with sorted exceptions and middlewares." },
140
+ messages: { sortError: "Test functions should be grouped by method with sorted errors, exceptions and middlewares." },
141
141
  schema: [],
142
142
  type: "suggestion"
143
143
  },
@@ -153,9 +153,12 @@ const rule$c = {
153
153
  }
154
154
  function getTestPriority(testName) {
155
155
  if (testName.includes(".middlewares.")) {
156
- return 3;
156
+ return 4;
157
157
  }
158
158
  if (testName.includes(".exceptions.")) {
159
+ return 3;
160
+ }
161
+ if (testName.includes(".errors.")) {
159
162
  return 2;
160
163
  }
161
164
  return 1;
@@ -167,7 +170,7 @@ const rule$c = {
167
170
  function getSpecificName(testName) {
168
171
  const parts = testName.split(".");
169
172
  const specialIndex = parts.findIndex(
170
- (part) => part === "exceptions" || part === "middlewares"
173
+ (part) => part === "errors" || part === "exceptions" || part === "middlewares"
171
174
  );
172
175
  if (specialIndex === -1) {
173
176
  return parts.slice(2).join(".");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saasmakers/eslint",
3
3
  "type": "module",
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "private": false,
6
6
  "description": "Shared ESLint config for SaaS Makers projects",
7
7
  "license": "MIT",
@@ -33,13 +33,14 @@
33
33
  "@antfu/eslint-config": "6.2.0",
34
34
  "@typescript-eslint/utils": "8.49.0",
35
35
  "@unocss/eslint-config": "66.5.10-beta.1",
36
- "eslint-plugin-package-json": "0.85.0"
36
+ "eslint-plugin-package-json": "0.85.0",
37
+ "eslint-plugin-storybook": "9.1.16"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/estree": "1.0.8",
40
41
  "eslint": "9.39.1",
41
42
  "typescript": "5.9.3",
42
- "@saasmakers/config": "0.1.19"
43
+ "@saasmakers/config": "0.1.20"
43
44
  },
44
45
  "scripts": {
45
46
  "build": "unbuild",