@jsse/eslint-config 0.0.4 → 0.0.6
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/LICENSE +21 -21
- package/README.md +5 -0
- package/dist/cli.cjs +4 -2
- package/dist/cli.js +4 -2
- package/dist/index.cjs +287 -194
- package/dist/index.d.cts +121 -2
- package/dist/index.d.ts +121 -2
- package/dist/index.js +286 -194
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -204,11 +204,130 @@ declare function jsonc(options?: OptionsStylistic & OptionsOverrides): ConfigIte
|
|
|
204
204
|
declare function node(): ConfigItem[];
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
|
-
*
|
|
207
|
+
* Copied from https://raw.githubusercontent.com/prettier/eslint-config-prettier/main/index.js
|
|
208
|
+
* Main difference is we exclude rules we don't care about.... (flow/babel/etc)
|
|
208
209
|
*/
|
|
209
210
|
declare function eslintConfigPrettierRules(): ConfigItem["rules"];
|
|
210
211
|
declare function prettier(): ConfigItem[];
|
|
211
212
|
|
|
213
|
+
declare function reactRules(): {
|
|
214
|
+
"react-hooks/exhaustive-deps": string;
|
|
215
|
+
"react-hooks/rules-of-hooks": string;
|
|
216
|
+
"react/boolean-prop-naming": (string | {
|
|
217
|
+
rule: string;
|
|
218
|
+
validateNested: boolean;
|
|
219
|
+
})[];
|
|
220
|
+
"react/button-has-type": string;
|
|
221
|
+
"react/function-component-definition": (string | {
|
|
222
|
+
namedComponents: string;
|
|
223
|
+
unnamedComponents: string;
|
|
224
|
+
})[];
|
|
225
|
+
"react/hook-use-state": string;
|
|
226
|
+
"react/iframe-missing-sandbox": string;
|
|
227
|
+
"react/jsx-boolean-value": string;
|
|
228
|
+
"react/jsx-child-element-spacing": string;
|
|
229
|
+
"react/jsx-closing-bracket-location": (string | {
|
|
230
|
+
nonEmpty: string;
|
|
231
|
+
selfClosing: boolean;
|
|
232
|
+
})[];
|
|
233
|
+
"react/jsx-closing-tag-location": string;
|
|
234
|
+
"react/jsx-curly-brace-presence": (string | {
|
|
235
|
+
children: string;
|
|
236
|
+
propElementValues: string;
|
|
237
|
+
props: string;
|
|
238
|
+
})[];
|
|
239
|
+
"react/jsx-curly-newline": (string | {
|
|
240
|
+
multiline: string;
|
|
241
|
+
singleline: string;
|
|
242
|
+
})[];
|
|
243
|
+
"react/jsx-curly-spacing": string[];
|
|
244
|
+
"react/jsx-equals-spacing": string[];
|
|
245
|
+
"react/jsx-first-prop-new-line": string;
|
|
246
|
+
"react/jsx-fragments": string[];
|
|
247
|
+
"react/jsx-indent": (string | number)[];
|
|
248
|
+
"react/jsx-indent-props": (string | number)[];
|
|
249
|
+
"react/jsx-key": string;
|
|
250
|
+
"react/jsx-max-props-per-line": (string | {
|
|
251
|
+
maximum: number;
|
|
252
|
+
when: string;
|
|
253
|
+
})[];
|
|
254
|
+
"react/jsx-no-bind": (string | {
|
|
255
|
+
allowArrowFunctions: boolean;
|
|
256
|
+
})[];
|
|
257
|
+
"react/jsx-no-comment-textnodes": string;
|
|
258
|
+
"react/jsx-no-constructed-context-values": string;
|
|
259
|
+
"react/jsx-no-duplicate-props": (string | {
|
|
260
|
+
ignoreCase: boolean;
|
|
261
|
+
})[];
|
|
262
|
+
"react/jsx-no-script-url": string;
|
|
263
|
+
"react/jsx-no-target-blank": (string | {
|
|
264
|
+
forms: boolean;
|
|
265
|
+
warnOnSpreadAttributes: boolean;
|
|
266
|
+
})[];
|
|
267
|
+
"react/jsx-no-undef": string;
|
|
268
|
+
"react/jsx-no-useless-fragment": string;
|
|
269
|
+
"react/jsx-pascal-case": string;
|
|
270
|
+
"react/jsx-props-no-multi-spaces": string;
|
|
271
|
+
"react/jsx-sort-props": (string | {
|
|
272
|
+
callbacksLast: boolean;
|
|
273
|
+
noSortAlphabetically: boolean;
|
|
274
|
+
reservedFirst: boolean;
|
|
275
|
+
shorthandFirst: boolean;
|
|
276
|
+
})[];
|
|
277
|
+
"react/jsx-tag-spacing": (string | {
|
|
278
|
+
afterOpening: string;
|
|
279
|
+
beforeClosing: string;
|
|
280
|
+
beforeSelfClosing: string;
|
|
281
|
+
closingSlash: string;
|
|
282
|
+
})[];
|
|
283
|
+
"react/jsx-uses-react": string;
|
|
284
|
+
"react/jsx-uses-vars": string;
|
|
285
|
+
"react/jsx-wrap-multilines": (string | {
|
|
286
|
+
arrow: string;
|
|
287
|
+
assignment: string;
|
|
288
|
+
condition: string;
|
|
289
|
+
declaration: string;
|
|
290
|
+
logical: string;
|
|
291
|
+
prop: string;
|
|
292
|
+
return: string;
|
|
293
|
+
})[];
|
|
294
|
+
"react/no-access-state-in-setstate": string;
|
|
295
|
+
"react/no-array-index-key": string;
|
|
296
|
+
"react/no-arrow-function-lifecycle": string;
|
|
297
|
+
"react/no-children-prop": string;
|
|
298
|
+
"react/no-danger": string;
|
|
299
|
+
"react/no-danger-with-children": string;
|
|
300
|
+
"react/no-deprecated": string;
|
|
301
|
+
"react/no-did-update-set-state": string;
|
|
302
|
+
"react/no-direct-mutation-state": string;
|
|
303
|
+
"react/no-find-dom-node": string;
|
|
304
|
+
"react/no-invalid-html-attribute": string;
|
|
305
|
+
"react/no-is-mounted": string;
|
|
306
|
+
"react/no-namespace": string;
|
|
307
|
+
"react/no-redundant-should-component-update": string;
|
|
308
|
+
"react/no-render-return-value": string;
|
|
309
|
+
"react/no-string-refs": (string | {
|
|
310
|
+
noTemplateLiterals: boolean;
|
|
311
|
+
})[];
|
|
312
|
+
"react/no-this-in-sfc": string;
|
|
313
|
+
"react/no-typos": string;
|
|
314
|
+
"react/no-unescaped-entities": string;
|
|
315
|
+
"react/no-unsafe": string;
|
|
316
|
+
"react/no-unused-state": string;
|
|
317
|
+
"react/prefer-read-only-props": string;
|
|
318
|
+
"react/react-in-jsx-scope": string;
|
|
319
|
+
"react/require-default-props": (string | {
|
|
320
|
+
forbidDefaultForRequired: boolean;
|
|
321
|
+
ignoreFunctionalComponents: boolean;
|
|
322
|
+
})[];
|
|
323
|
+
"react/self-closing-comp": string;
|
|
324
|
+
"react/state-in-constructor": string[];
|
|
325
|
+
"react/static-property-placement": string;
|
|
326
|
+
"react/style-prop-object": (string | {
|
|
327
|
+
allow: string[];
|
|
328
|
+
})[];
|
|
329
|
+
"react/void-dom-elements-no-children": string;
|
|
330
|
+
};
|
|
212
331
|
declare function reactHooks(): {
|
|
213
332
|
files: string[];
|
|
214
333
|
plugins: {
|
|
@@ -277,4 +396,4 @@ declare function isInEditor(): boolean;
|
|
|
277
396
|
declare function jssestd(): ConfigItem[];
|
|
278
397
|
declare function jsseReact(): ConfigItem[];
|
|
279
398
|
|
|
280
|
-
export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, OptionsCommon, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsPrefix, OptionsReact, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, prettier, react, reactHooks, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
|
|
399
|
+
export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, OptionsCommon, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsPrefix, OptionsReact, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, prettier, react, reactHooks, reactRules, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
|
package/dist/index.d.ts
CHANGED
|
@@ -204,11 +204,130 @@ declare function jsonc(options?: OptionsStylistic & OptionsOverrides): ConfigIte
|
|
|
204
204
|
declare function node(): ConfigItem[];
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
|
-
*
|
|
207
|
+
* Copied from https://raw.githubusercontent.com/prettier/eslint-config-prettier/main/index.js
|
|
208
|
+
* Main difference is we exclude rules we don't care about.... (flow/babel/etc)
|
|
208
209
|
*/
|
|
209
210
|
declare function eslintConfigPrettierRules(): ConfigItem["rules"];
|
|
210
211
|
declare function prettier(): ConfigItem[];
|
|
211
212
|
|
|
213
|
+
declare function reactRules(): {
|
|
214
|
+
"react-hooks/exhaustive-deps": string;
|
|
215
|
+
"react-hooks/rules-of-hooks": string;
|
|
216
|
+
"react/boolean-prop-naming": (string | {
|
|
217
|
+
rule: string;
|
|
218
|
+
validateNested: boolean;
|
|
219
|
+
})[];
|
|
220
|
+
"react/button-has-type": string;
|
|
221
|
+
"react/function-component-definition": (string | {
|
|
222
|
+
namedComponents: string;
|
|
223
|
+
unnamedComponents: string;
|
|
224
|
+
})[];
|
|
225
|
+
"react/hook-use-state": string;
|
|
226
|
+
"react/iframe-missing-sandbox": string;
|
|
227
|
+
"react/jsx-boolean-value": string;
|
|
228
|
+
"react/jsx-child-element-spacing": string;
|
|
229
|
+
"react/jsx-closing-bracket-location": (string | {
|
|
230
|
+
nonEmpty: string;
|
|
231
|
+
selfClosing: boolean;
|
|
232
|
+
})[];
|
|
233
|
+
"react/jsx-closing-tag-location": string;
|
|
234
|
+
"react/jsx-curly-brace-presence": (string | {
|
|
235
|
+
children: string;
|
|
236
|
+
propElementValues: string;
|
|
237
|
+
props: string;
|
|
238
|
+
})[];
|
|
239
|
+
"react/jsx-curly-newline": (string | {
|
|
240
|
+
multiline: string;
|
|
241
|
+
singleline: string;
|
|
242
|
+
})[];
|
|
243
|
+
"react/jsx-curly-spacing": string[];
|
|
244
|
+
"react/jsx-equals-spacing": string[];
|
|
245
|
+
"react/jsx-first-prop-new-line": string;
|
|
246
|
+
"react/jsx-fragments": string[];
|
|
247
|
+
"react/jsx-indent": (string | number)[];
|
|
248
|
+
"react/jsx-indent-props": (string | number)[];
|
|
249
|
+
"react/jsx-key": string;
|
|
250
|
+
"react/jsx-max-props-per-line": (string | {
|
|
251
|
+
maximum: number;
|
|
252
|
+
when: string;
|
|
253
|
+
})[];
|
|
254
|
+
"react/jsx-no-bind": (string | {
|
|
255
|
+
allowArrowFunctions: boolean;
|
|
256
|
+
})[];
|
|
257
|
+
"react/jsx-no-comment-textnodes": string;
|
|
258
|
+
"react/jsx-no-constructed-context-values": string;
|
|
259
|
+
"react/jsx-no-duplicate-props": (string | {
|
|
260
|
+
ignoreCase: boolean;
|
|
261
|
+
})[];
|
|
262
|
+
"react/jsx-no-script-url": string;
|
|
263
|
+
"react/jsx-no-target-blank": (string | {
|
|
264
|
+
forms: boolean;
|
|
265
|
+
warnOnSpreadAttributes: boolean;
|
|
266
|
+
})[];
|
|
267
|
+
"react/jsx-no-undef": string;
|
|
268
|
+
"react/jsx-no-useless-fragment": string;
|
|
269
|
+
"react/jsx-pascal-case": string;
|
|
270
|
+
"react/jsx-props-no-multi-spaces": string;
|
|
271
|
+
"react/jsx-sort-props": (string | {
|
|
272
|
+
callbacksLast: boolean;
|
|
273
|
+
noSortAlphabetically: boolean;
|
|
274
|
+
reservedFirst: boolean;
|
|
275
|
+
shorthandFirst: boolean;
|
|
276
|
+
})[];
|
|
277
|
+
"react/jsx-tag-spacing": (string | {
|
|
278
|
+
afterOpening: string;
|
|
279
|
+
beforeClosing: string;
|
|
280
|
+
beforeSelfClosing: string;
|
|
281
|
+
closingSlash: string;
|
|
282
|
+
})[];
|
|
283
|
+
"react/jsx-uses-react": string;
|
|
284
|
+
"react/jsx-uses-vars": string;
|
|
285
|
+
"react/jsx-wrap-multilines": (string | {
|
|
286
|
+
arrow: string;
|
|
287
|
+
assignment: string;
|
|
288
|
+
condition: string;
|
|
289
|
+
declaration: string;
|
|
290
|
+
logical: string;
|
|
291
|
+
prop: string;
|
|
292
|
+
return: string;
|
|
293
|
+
})[];
|
|
294
|
+
"react/no-access-state-in-setstate": string;
|
|
295
|
+
"react/no-array-index-key": string;
|
|
296
|
+
"react/no-arrow-function-lifecycle": string;
|
|
297
|
+
"react/no-children-prop": string;
|
|
298
|
+
"react/no-danger": string;
|
|
299
|
+
"react/no-danger-with-children": string;
|
|
300
|
+
"react/no-deprecated": string;
|
|
301
|
+
"react/no-did-update-set-state": string;
|
|
302
|
+
"react/no-direct-mutation-state": string;
|
|
303
|
+
"react/no-find-dom-node": string;
|
|
304
|
+
"react/no-invalid-html-attribute": string;
|
|
305
|
+
"react/no-is-mounted": string;
|
|
306
|
+
"react/no-namespace": string;
|
|
307
|
+
"react/no-redundant-should-component-update": string;
|
|
308
|
+
"react/no-render-return-value": string;
|
|
309
|
+
"react/no-string-refs": (string | {
|
|
310
|
+
noTemplateLiterals: boolean;
|
|
311
|
+
})[];
|
|
312
|
+
"react/no-this-in-sfc": string;
|
|
313
|
+
"react/no-typos": string;
|
|
314
|
+
"react/no-unescaped-entities": string;
|
|
315
|
+
"react/no-unsafe": string;
|
|
316
|
+
"react/no-unused-state": string;
|
|
317
|
+
"react/prefer-read-only-props": string;
|
|
318
|
+
"react/react-in-jsx-scope": string;
|
|
319
|
+
"react/require-default-props": (string | {
|
|
320
|
+
forbidDefaultForRequired: boolean;
|
|
321
|
+
ignoreFunctionalComponents: boolean;
|
|
322
|
+
})[];
|
|
323
|
+
"react/self-closing-comp": string;
|
|
324
|
+
"react/state-in-constructor": string[];
|
|
325
|
+
"react/static-property-placement": string;
|
|
326
|
+
"react/style-prop-object": (string | {
|
|
327
|
+
allow: string[];
|
|
328
|
+
})[];
|
|
329
|
+
"react/void-dom-elements-no-children": string;
|
|
330
|
+
};
|
|
212
331
|
declare function reactHooks(): {
|
|
213
332
|
files: string[];
|
|
214
333
|
plugins: {
|
|
@@ -277,4 +396,4 @@ declare function isInEditor(): boolean;
|
|
|
277
396
|
declare function jssestd(): ConfigItem[];
|
|
278
397
|
declare function jsseReact(): ConfigItem[];
|
|
279
398
|
|
|
280
|
-
export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, OptionsCommon, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsPrefix, OptionsReact, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, prettier, react, reactHooks, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
|
|
399
|
+
export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, OptionsCommon, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsPrefix, OptionsReact, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, prettier, react, reactHooks, reactRules, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
|