@workleap/eslint-configs 1.1.7 → 1.1.8
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/CHANGELOG.md +6 -0
- package/dist/storybook.js +3 -1
- package/dist/storybook.js.map +1 -1
- package/package.json +1 -1
- package/src/storybook.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @workleap/eslint-configs
|
|
2
2
|
|
|
3
|
+
## 1.1.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#341](https://github.com/workleap/wl-web-configs/pull/341) [`af33aef`](https://github.com/workleap/wl-web-configs/commit/af33aefdd46666d3b48fe1f4198dc96ff4002b14) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Do not lint the "mockServiceWorker.js" file in the .storybook folder.
|
|
8
|
+
|
|
3
9
|
## 1.1.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/storybook.js
CHANGED
|
@@ -6,7 +6,9 @@ import eslint_plugin_storybook from "eslint-plugin-storybook";
|
|
|
6
6
|
|
|
7
7
|
const storybookGlobalIgnores = [
|
|
8
8
|
"!.storybook",
|
|
9
|
-
"storybook-static"
|
|
9
|
+
"storybook-static",
|
|
10
|
+
// Because it's usually included in the ".storybook" folder.
|
|
11
|
+
"mockServiceWorker.js"
|
|
10
12
|
];
|
|
11
13
|
function defineStorybookConfig(options = {}) {
|
|
12
14
|
const { storiesRules = {}, mainFileRules = {} } = options;
|
package/dist/storybook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.js","sources":["../src/storybook.ts"],"sourcesContent":["import type { Linter } from \"eslint\";\nimport storybookPlugin from \"eslint-plugin-storybook\";\nimport type { ConfigWithExtends } from \"./types.ts\";\n\nexport interface StorybookConfigOptions {\n storiesRules?: Partial<Linter.RulesRecord>;\n mainFileRules?: Partial<Linter.RulesRecord>;\n}\n\nexport const storybookGlobalIgnores = [\n \"!.storybook\",\n \"storybook-static\"\n];\n\nexport function defineStorybookConfig(options: StorybookConfigOptions = {}) {\n const {\n storiesRules = {},\n mainFileRules = {}\n } = options;\n\n const config: ConfigWithExtends[] = [\n {\n name: \"@workleap/eslint-configs/storybook-stories\",\n files: [\n \"**/*.{stories,storybook,story,chroma}.{js,ts,jsx,tsx}\"\n ],\n extends: [\n // @ts-expect-error the typings are broken and think there's a \".default\" to add.\n storybookPlugin.configs[\"flat/recommended\"]\n // // @ts-expect-error the types are broken and think there's a \".default\" to add.\n // storybookPlugin.configs[\"flat/csf\"],\n // // @ts-expect-error the types are broken and think there's a \".default\" to add.\n // storybookPlugin.configs[\"flat/csf-strict\"]\n ],\n rules: storiesRules\n },\n {\n name: \"@workleap/eslint-configs/storybook-main\",\n files: [\"**/{.storybook,storybook}/main.@(js|cjs|mjs|ts)\"],\n plugins: {\n // @ts-expect-error the typings are broken.\n storybook: storybookPlugin\n },\n rules: {\n \"storybook/no-uninstalled-addons\": \"warn\",\n // Positioned last to allow the consumer to override any rules.\n ...mainFileRules\n }\n }\n ];\n\n return config;\n};\n"],"names":["storybookPlugin","storybookGlobalIgnores","defineStorybookConfig","options","storiesRules","mainFileRules","config"],"mappings":";;;;;AACsD;AAQ/C,MAAMC,yBAAyB;IAClC;IACA;CACH,CAAC;AAEK,SAASC,sBAAsBC,UAAkC,CAAC,CAAC;IACtE,MAAM,EACFC,eAAe,CAAC,CAAC,EACjBC,gBAAgB,CAAC,CAAC,EACrB,GAAGF;IAEJ,MAAMG,SAA8B;QAChC;YACI,MAAM;YACN,OAAO;gBACH;aACH;YACD,SAAS;gBACL,iFAAiF;gBACjFN,mDAA2C;aAK9C;YACD,OAAOI;QACX;QACA;YACI,MAAM;YACN,OAAO;gBAAC;aAAkD;YAC1D,SAAS;gBACL,2CAA2C;gBAC3C,WAAWJ,uBAAeA;YAC9B;YACA,OAAO;gBACH,mCAAmC;gBACnC,+DAA+D;gBAC/D,GAAGK,aAAa;YACpB;QACJ;KACH;IAED,OAAOC;AACX"}
|
|
1
|
+
{"version":3,"file":"storybook.js","sources":["../src/storybook.ts"],"sourcesContent":["import type { Linter } from \"eslint\";\nimport storybookPlugin from \"eslint-plugin-storybook\";\nimport type { ConfigWithExtends } from \"./types.ts\";\n\nexport interface StorybookConfigOptions {\n storiesRules?: Partial<Linter.RulesRecord>;\n mainFileRules?: Partial<Linter.RulesRecord>;\n}\n\nexport const storybookGlobalIgnores = [\n \"!.storybook\",\n \"storybook-static\",\n // Because it's usually included in the \".storybook\" folder.\n \"mockServiceWorker.js\"\n];\n\nexport function defineStorybookConfig(options: StorybookConfigOptions = {}) {\n const {\n storiesRules = {},\n mainFileRules = {}\n } = options;\n\n const config: ConfigWithExtends[] = [\n {\n name: \"@workleap/eslint-configs/storybook-stories\",\n files: [\n \"**/*.{stories,storybook,story,chroma}.{js,ts,jsx,tsx}\"\n ],\n extends: [\n // @ts-expect-error the typings are broken and think there's a \".default\" to add.\n storybookPlugin.configs[\"flat/recommended\"]\n // // @ts-expect-error the types are broken and think there's a \".default\" to add.\n // storybookPlugin.configs[\"flat/csf\"],\n // // @ts-expect-error the types are broken and think there's a \".default\" to add.\n // storybookPlugin.configs[\"flat/csf-strict\"]\n ],\n rules: storiesRules\n },\n {\n name: \"@workleap/eslint-configs/storybook-main\",\n files: [\"**/{.storybook,storybook}/main.@(js|cjs|mjs|ts)\"],\n plugins: {\n // @ts-expect-error the typings are broken.\n storybook: storybookPlugin\n },\n rules: {\n \"storybook/no-uninstalled-addons\": \"warn\",\n // Positioned last to allow the consumer to override any rules.\n ...mainFileRules\n }\n }\n ];\n\n return config;\n};\n"],"names":["storybookPlugin","storybookGlobalIgnores","defineStorybookConfig","options","storiesRules","mainFileRules","config"],"mappings":";;;;;AACsD;AAQ/C,MAAMC,yBAAyB;IAClC;IACA;IACA,4DAA4D;IAC5D;CACH,CAAC;AAEK,SAASC,sBAAsBC,UAAkC,CAAC,CAAC;IACtE,MAAM,EACFC,eAAe,CAAC,CAAC,EACjBC,gBAAgB,CAAC,CAAC,EACrB,GAAGF;IAEJ,MAAMG,SAA8B;QAChC;YACI,MAAM;YACN,OAAO;gBACH;aACH;YACD,SAAS;gBACL,iFAAiF;gBACjFN,mDAA2C;aAK9C;YACD,OAAOI;QACX;QACA;YACI,MAAM;YACN,OAAO;gBAAC;aAAkD;YAC1D,SAAS;gBACL,2CAA2C;gBAC3C,WAAWJ,uBAAeA;YAC9B;YACA,OAAO;gBACH,mCAAmC;gBACnC,+DAA+D;gBAC/D,GAAGK,aAAa;YACpB;QACJ;KACH;IAED,OAAOC;AACX"}
|
package/package.json
CHANGED
package/src/storybook.ts
CHANGED
|
@@ -9,7 +9,9 @@ export interface StorybookConfigOptions {
|
|
|
9
9
|
|
|
10
10
|
export const storybookGlobalIgnores = [
|
|
11
11
|
"!.storybook",
|
|
12
|
-
"storybook-static"
|
|
12
|
+
"storybook-static",
|
|
13
|
+
// Because it's usually included in the ".storybook" folder.
|
|
14
|
+
"mockServiceWorker.js"
|
|
13
15
|
];
|
|
14
16
|
|
|
15
17
|
export function defineStorybookConfig(options: StorybookConfigOptions = {}) {
|