@newsteam/eslint-config 0.0.197 → 0.0.199

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/cjs/index.js CHANGED
@@ -15,6 +15,7 @@ module.exports = {
15
15
  "./plugins/import",
16
16
  "./plugins/import-newlines",
17
17
  "./plugins/more",
18
+ "./plugins/new-line-destructuring",
18
19
  "./plugins/no-unsanitized",
19
20
  "./plugins/no-useless-assign",
20
21
  "./plugins/node",
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ plugins: string[];
3
+ rules: {
4
+ "newline-destructuring/newline": string;
5
+ };
6
+ };
7
+ export = _default;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /*
3
+ * Eslint plugin for enforcing newlines in object destructuring assignment past a certain number of properties.
4
+ *
5
+ * https://www.npmjs.com/package/eslint-plugin-newline-destructuring
6
+ */
7
+ module.exports = {
8
+ plugins: ["more"],
9
+ rules: {
10
+ /*
11
+ * Enforce newlines in object destructuring assignment past a certain number of properties
12
+ *
13
+ * https://www.npmjs.com/package/eslint-plugin-newline-destructuring
14
+ */
15
+ "newline-destructuring/newline": "error",
16
+ },
17
+ };
@@ -45,7 +45,9 @@ declare const _default: {
45
45
  "@stylistic/jsx-first-prop-new-line": string;
46
46
  "@stylistic/jsx-indent": string;
47
47
  "@stylistic/jsx-indent-props": string;
48
- "@stylistic/jsx-max-props-per-line": string;
48
+ "@stylistic/jsx-max-props-per-line": (string | {
49
+ maximum: number;
50
+ })[];
49
51
  "@stylistic/jsx-newline": string;
50
52
  "@stylistic/jsx-one-expression-per-line": string;
51
53
  "@stylistic/jsx-props-no-multi-spaces": string;
@@ -156,12 +158,31 @@ declare const _default: {
156
158
  "@stylistic/no-whitespace-before-property": string;
157
159
  "@stylistic/nonblock-statement-body-position": string;
158
160
  "@stylistic/object-curly-newline": (string | {
159
- consistent: boolean;
160
- minProperties: number;
161
- multiline: boolean;
161
+ ExportDeclaration: {
162
+ consistent: boolean;
163
+ minProperties: number;
164
+ multiline: boolean;
165
+ };
166
+ ImportDeclaration: {
167
+ consistent: boolean;
168
+ minProperties: number;
169
+ multiline: boolean;
170
+ };
171
+ ObjectExpression: {
172
+ consistent: boolean;
173
+ minProperties: number;
174
+ multiline: boolean;
175
+ };
176
+ ObjectPattern: {
177
+ consistent: boolean;
178
+ minProperties: number;
179
+ multiline: boolean;
180
+ };
162
181
  })[];
163
182
  "@stylistic/object-curly-spacing": string[];
164
- "@stylistic/object-property-newline": string;
183
+ "@stylistic/object-property-newline": (string | {
184
+ allowAllPropertiesOnSameLine: boolean;
185
+ })[];
165
186
  "@stylistic/one-var-declaration-per-line": string;
166
187
  "@stylistic/operator-linebreak": string;
167
188
  "@stylistic/padded-blocks": (string | {
@@ -235,7 +235,10 @@ module.exports = {
235
235
  *
236
236
  * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
237
237
  */
238
- "@stylistic/jsx-max-props-per-line": "off",
238
+ "@stylistic/jsx-max-props-per-line": [
239
+ "error",
240
+ { maximum: 1 }
241
+ ],
239
242
  /*
240
243
  * Enforce a new line after jsx elements and expressions (fixable)
241
244
  *
@@ -540,9 +543,26 @@ module.exports = {
540
543
  "@stylistic/object-curly-newline": [
541
544
  "error",
542
545
  {
543
- consistent: true,
544
- minProperties: 2,
545
- multiline: true,
546
+ ExportDeclaration: {
547
+ consistent: true,
548
+ minProperties: 2,
549
+ multiline: true,
550
+ },
551
+ ImportDeclaration: {
552
+ consistent: true,
553
+ minProperties: 2,
554
+ multiline: true,
555
+ },
556
+ ObjectExpression: {
557
+ consistent: true,
558
+ minProperties: 2,
559
+ multiline: true,
560
+ },
561
+ ObjectPattern: {
562
+ consistent: true,
563
+ minProperties: 2,
564
+ multiline: true,
565
+ },
546
566
  }
547
567
  ],
548
568
  /*
@@ -556,7 +576,12 @@ module.exports = {
556
576
  *
557
577
  * https://eslint.org/docs/rules/object-property-newline
558
578
  */
559
- "@stylistic/object-property-newline": "error",
579
+ "@stylistic/object-property-newline": [
580
+ "error",
581
+ {
582
+ allowAllPropertiesOnSameLine: false,
583
+ }
584
+ ],
560
585
  /*
561
586
  * Require or disallow newlines around variable declarations
562
587
  *
@@ -9,4 +9,4 @@ export declare const noMagicNumbersConfig: {
9
9
  ignoreArrayIndexes: boolean;
10
10
  ignoreDefaultValues: boolean;
11
11
  };
12
- export declare const nodeVersion = ">=16.14.0";
12
+ export declare const nodeVersion = ">=20.9.0";
@@ -18,4 +18,4 @@ exports.noMagicNumbersConfig = {
18
18
  ignoreArrayIndexes: true,
19
19
  ignoreDefaultValues: true,
20
20
  };
21
- exports.nodeVersion = ">=16.14.0";
21
+ exports.nodeVersion = ">=20.9.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newsteam/eslint-config",
3
- "version": "0.0.197",
3
+ "version": "0.0.199",
4
4
  "description": "Shared config for eslint",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
@@ -9,8 +9,8 @@
9
9
  "clean": "rimraf dist",
10
10
  "clean:tests": "rimraf dist/**/*.test.js dist/**/*.test.d.ts dist/*.test.js dist/*.test.d.ts",
11
11
  "depcheck": "depcheck",
12
- "lint": "npm run lint:eslint && npm run depcheck",
13
- "lint:eslint": "cd ../.. && eslint packages/stylelint-config/src",
12
+ "lint": "npm run lint:eslint",
13
+ "lint:eslint": "cd ../.. && eslint packages/eslint-config/src --fix",
14
14
  "prepublishOnly": "npm run clean && npm run build && npm run lint && npm run test && npm run clean:tests",
15
15
  "test": "npm run test:ts && npm run depcheck && npm run test:rules",
16
16
  "test:ts": "tsc --noEmit",
@@ -56,10 +56,10 @@
56
56
  "devDependencies": {
57
57
  "@stylistic/eslint-plugin": "1.4.0",
58
58
  "@types/eslint": "8.44.7",
59
- "@types/jasmine": "^5.1.2",
60
- "@types/node": "20.9.2",
61
- "@typescript-eslint/eslint-plugin": "6.11.0",
62
- "@typescript-eslint/parser": "6.11.0",
59
+ "@types/jasmine": "^5.1.3",
60
+ "@types/node": "20.9.3",
61
+ "@typescript-eslint/eslint-plugin": "6.12.0",
62
+ "@typescript-eslint/parser": "6.12.0",
63
63
  "eslint": "8.54.0",
64
64
  "eslint-find-rules": "4.1.0",
65
65
  "eslint-plugin-array-func": "4.0.0",
@@ -71,6 +71,7 @@
71
71
  "eslint-plugin-import": "2.29.0",
72
72
  "eslint-plugin-import-newlines": "1.3.4",
73
73
  "eslint-plugin-more": "1.0.5",
74
+ "eslint-plugin-newline-destructuring": "1.2.1",
74
75
  "eslint-plugin-no-unsanitized": "4.0.2",
75
76
  "eslint-plugin-no-useless-assign": "1.0.3",
76
77
  "eslint-plugin-node": "11.1.0",
@@ -88,12 +89,12 @@
88
89
  "eslint-plugin-unicorn": "49.0.0",
89
90
  "jasmine": "^5.1.0",
90
91
  "json-schema": "0.4.0",
91
- "typescript": "5.2.2"
92
+ "typescript": "5.3.2"
92
93
  },
93
94
  "peerDependencies": {
94
95
  "@stylistic/eslint-plugin": "1.4.0",
95
- "@typescript-eslint/eslint-plugin": "6.11.0",
96
- "@typescript-eslint/parser": "6.11.0",
96
+ "@typescript-eslint/eslint-plugin": "6.12.0",
97
+ "@typescript-eslint/parser": "6.12.0",
97
98
  "eslint": "8.54.0",
98
99
  "eslint-plugin-array-func": "4.0.0",
99
100
  "eslint-plugin-css-modules": "2.12.0",
@@ -103,6 +104,7 @@
103
104
  "eslint-plugin-format-message": "6.2.4",
104
105
  "eslint-plugin-import": "2.29.0",
105
106
  "eslint-plugin-more": "1.0.5",
107
+ "eslint-plugin-newline-destructuring": "1.2.1",
106
108
  "eslint-plugin-no-unsanitized": "4.0.2",
107
109
  "eslint-plugin-no-useless-assign": "1.0.3",
108
110
  "eslint-plugin-node": "11.1.0",
@@ -120,6 +122,6 @@
120
122
  "eslint-plugin-unicorn": "49.0.0",
121
123
  "eslint-plugin-you-dont-need-lodash-underscore": "6.13.0",
122
124
  "json-schema": "0.4.0",
123
- "typescript": "5.2.2"
125
+ "typescript": "5.3.2"
124
126
  }
125
127
  }