@storm-software/eslint 0.125.1 → 0.126.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.
Files changed (2) hide show
  1. package/dist/preset.js +22 -14
  2. package/package.json +1 -1
package/dist/preset.js CHANGED
@@ -166,6 +166,9 @@ async function disables() {
166
166
  }
167
167
  __name(disables, "disables");
168
168
 
169
+ // src/configs/formatters.ts
170
+ import defu from "defu";
171
+
169
172
  // src/configs/stylistic.ts
170
173
  var StylisticConfigDefaults = {
171
174
  indent: 2,
@@ -174,7 +177,7 @@ var StylisticConfigDefaults = {
174
177
  semi: true
175
178
  };
176
179
  async function stylistic(options = {}) {
177
- const { indent, jsx: jsx2, overrides = {}, quotes, semi, lineEndings = "unix" } = {
180
+ const { indent = 2, jsx: jsx2 = true, overrides = {}, quotes = "double", semi = true, lineEndings = "unix" } = {
178
181
  ...StylisticConfigDefaults,
179
182
  ...options
180
183
  };
@@ -245,30 +248,35 @@ async function formatters(options = {}, stylistic2 = {}) {
245
248
  options.astro ? "prettier-plugin-astro" : void 0,
246
249
  options.xml || options.svg ? "@prettier/plugin-xml" : void 0
247
250
  ]);
248
- const { indent, quotes, semi } = {
251
+ const { indent = 2, quotes = "double", semi = true } = {
249
252
  ...StylisticConfigDefaults,
250
253
  ...stylistic2
251
254
  };
252
- const prettierOptions = Object.assign({
253
- endOfLine: "auto",
255
+ const prettierOptions = defu({
256
+ proseWrap: "always",
257
+ quoteProps: "preserve",
258
+ bracketSameLine: true,
259
+ bracketSpacing: true,
260
+ arrowParens: "avoid",
261
+ endOfLine: "lf",
254
262
  printWidth: 120,
255
263
  semi,
256
264
  singleQuote: quotes === "single",
257
265
  tabWidth: typeof indent === "number" ? indent : 2,
258
- trailingComma: "all",
266
+ trailingComma: "none",
259
267
  useTabs: indent === "tab"
260
- }, options.prettierOptions || {});
268
+ }, options.prettierOptions ?? {});
261
269
  const prettierXmlOptions = {
262
270
  xmlQuoteAttributes: "double",
263
271
  xmlSelfClosingSpace: true,
264
272
  xmlSortAttributesByKey: false,
265
273
  xmlWhitespaceSensitivity: "ignore"
266
274
  };
267
- const dprintOptions = Object.assign({
275
+ const dprintOptions = defu({
268
276
  indentWidth: typeof indent === "number" ? indent : 2,
269
277
  quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
270
278
  useTabs: indent === "tab"
271
- }, options.dprintOptions || {});
279
+ }, options.dprintOptions ?? {});
272
280
  const pluginFormat = await interopDefault(import("eslint-plugin-format"));
273
281
  const configs2 = [
274
282
  {
@@ -774,7 +782,7 @@ async function imports(options = {}) {
774
782
  __name(imports, "imports");
775
783
 
776
784
  // src/configs/javascript.ts
777
- import defu from "defu";
785
+ import defu2 from "defu";
778
786
  import globalsLib from "globals";
779
787
  async function javascript(options = {}) {
780
788
  const { isInEditor = false, lineEndings = "unix", overrides = {}, name = "", globals = {} } = options;
@@ -783,7 +791,7 @@ async function javascript(options = {}) {
783
791
  name: "storm/javascript/setup",
784
792
  languageOptions: {
785
793
  ecmaVersion: 2022,
786
- globals: defu(globals, {
794
+ globals: defu2(globals, {
787
795
  ...globalsLib.browser,
788
796
  ...globalsLib.es2021,
789
797
  ...globalsLib.node,
@@ -2467,7 +2475,7 @@ async function node() {
2467
2475
  __name(node, "node");
2468
2476
 
2469
2477
  // src/configs/nx.ts
2470
- import defu2 from "defu";
2478
+ import defu3 from "defu";
2471
2479
  async function nx(options = {}) {
2472
2480
  const { depsCheck, moduleBoundaries } = options;
2473
2481
  return [
@@ -2495,7 +2503,7 @@ async function nx(options = {}) {
2495
2503
  rules: {
2496
2504
  "@nx/dependency-checks": [
2497
2505
  "error",
2498
- defu2(depsCheck ?? {}, {
2506
+ defu3(depsCheck ?? {}, {
2499
2507
  buildTargets: [
2500
2508
  "build-base",
2501
2509
  "build"
@@ -3339,10 +3347,10 @@ async function typescript(options = {}) {
3339
3347
  files,
3340
3348
  name: "storm/typescript/rules",
3341
3349
  rules: {
3342
- ...renameRules(pluginTs.configs["eslint-recommended"].overrides[0].rules, {
3350
+ ...renameRules(pluginTs.configs["eslint-recommended"]?.overrides?.[0]?.rules, {
3343
3351
  "@typescript-eslint": "ts"
3344
3352
  }),
3345
- ...renameRules(pluginTs.configs.strict.rules, {
3353
+ ...renameRules(pluginTs.configs.strict?.rules, {
3346
3354
  "@typescript-eslint": "ts"
3347
3355
  }),
3348
3356
  /*************************************************************
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.125.1",
3
+ "version": "0.126.0",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "repository": {