@dvukovic/style-guide 0.1.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 (54) hide show
  1. package/.eslintrc.js +26 -0
  2. package/.github/workflows/defalt.yml +49 -0
  3. package/.prettierignore +1 -0
  4. package/.prettierrc.js +4 -0
  5. package/.release-it.json +15 -0
  6. package/.stylelintrc.js +4 -0
  7. package/.yarnrc.yml +1 -0
  8. package/CHANGELOG.md +8 -0
  9. package/README.md +5 -0
  10. package/cspell.config.js +17 -0
  11. package/package.json +67 -0
  12. package/src/__tests__/Dockerfile +8 -0
  13. package/src/__tests__/component.tsx +14 -0
  14. package/src/__tests__/db.sql +4 -0
  15. package/src/__tests__/schema.prisma +14 -0
  16. package/src/__tests__/script.js +6 -0
  17. package/src/__tests__/script.sh +3 -0
  18. package/src/__tests__/script.test.js +13 -0
  19. package/src/__tests__/structure.xml +7 -0
  20. package/src/__tests__/style.css +74 -0
  21. package/src/__tests__/typed.ts +5 -0
  22. package/src/cspell/base.txt +73 -0
  23. package/src/eslint/configs/core.js +14 -0
  24. package/src/eslint/configs/jest.js +4 -0
  25. package/src/eslint/configs/mobx.js +4 -0
  26. package/src/eslint/configs/next.js +4 -0
  27. package/src/eslint/configs/node.js +4 -0
  28. package/src/eslint/configs/react-typescript.js +6 -0
  29. package/src/eslint/configs/react.js +4 -0
  30. package/src/eslint/plugins/eslint-comments.js +19 -0
  31. package/src/eslint/plugins/eslint.js +153 -0
  32. package/src/eslint/plugins/etc.js +16 -0
  33. package/src/eslint/plugins/import-x.js +31 -0
  34. package/src/eslint/plugins/jest-formatting.js +13 -0
  35. package/src/eslint/plugins/jest.js +54 -0
  36. package/src/eslint/plugins/mobx.js +9 -0
  37. package/src/eslint/plugins/n.js +33 -0
  38. package/src/eslint/plugins/next.js +28 -0
  39. package/src/eslint/plugins/promise.js +27 -0
  40. package/src/eslint/plugins/react-hooks.js +7 -0
  41. package/src/eslint/plugins/react.js +106 -0
  42. package/src/eslint/plugins/security-node.js +31 -0
  43. package/src/eslint/plugins/sonarjs.js +33 -0
  44. package/src/eslint/plugins/typescript-eslint.js +183 -0
  45. package/src/eslint/plugins/unicorn.js +155 -0
  46. package/src/eslint/plugins/unused-imports.js +7 -0
  47. package/src/prettier/configs/core.js +19 -0
  48. package/src/prettier/plugins/embed.js +8 -0
  49. package/src/prettier/plugins/prettier.js +23 -0
  50. package/src/prettier/plugins/sql.js +9 -0
  51. package/src/stylelint/configs/core.js +16 -0
  52. package/src/stylelint/plugins/order.js +19 -0
  53. package/src/stylelint/plugins/stylelint.js +93 -0
  54. package/tsconfig.json +13 -0
@@ -0,0 +1,183 @@
1
+ /** @type {import("@types/eslint").ESLint.ConfigData} */
2
+ module.exports = {
3
+ plugins: ["@typescript-eslint"],
4
+ rules: {
5
+ "@typescript-eslint/adjacent-overload-signatures": "error",
6
+ "@typescript-eslint/array-type": "error",
7
+ "@typescript-eslint/await-thenable": "error",
8
+ "@typescript-eslint/ban-ts-comment": "error",
9
+ "@typescript-eslint/ban-tslint-comment": "error",
10
+ "@typescript-eslint/ban-types": "error",
11
+ "@typescript-eslint/class-literal-property-style": "error",
12
+ "@typescript-eslint/consistent-generic-constructors": "error",
13
+ "@typescript-eslint/consistent-indexed-object-style": "error",
14
+ "@typescript-eslint/consistent-type-assertions": [
15
+ "error",
16
+ {
17
+ assertionStyle: "as",
18
+ objectLiteralTypeAssertions: "never",
19
+ },
20
+ ],
21
+ "@typescript-eslint/consistent-type-definitions": ["error", "type"],
22
+ "@typescript-eslint/consistent-type-exports": "error",
23
+ "@typescript-eslint/consistent-type-imports": [
24
+ "error",
25
+ {
26
+ fixStyle: "inline-type-imports",
27
+ prefer: "type-imports",
28
+ },
29
+ ],
30
+ "default-param-last": "off",
31
+ "@typescript-eslint/default-param-last": "error",
32
+ "dot-notation": "off",
33
+ "@typescript-eslint/dot-notation": "error",
34
+ "@typescript-eslint/explicit-member-accessibility": [
35
+ "error",
36
+ {
37
+ accessibility: "explicit",
38
+ overrides: {
39
+ accessors: "explicit",
40
+ constructors: "no-public",
41
+ methods: "explicit",
42
+ parameterProperties: "explicit",
43
+ properties: "explicit",
44
+ },
45
+ },
46
+ ],
47
+ "max-params": "off",
48
+ "@typescript-eslint/max-params": ["error", { max: 2 }],
49
+ "@typescript-eslint/method-signature-style": "error",
50
+ "no-array-constructor": "off",
51
+ "@typescript-eslint/no-array-constructor": "error",
52
+ "@typescript-eslint/no-array-delete": "error",
53
+ "@typescript-eslint/no-base-to-string": "error",
54
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
55
+ "@typescript-eslint/no-confusing-void-expression": "error",
56
+ "@typescript-eslint/no-duplicate-enum-values": "error",
57
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
58
+ "@typescript-eslint/no-dynamic-delete": "error",
59
+ "no-empty-function": "off",
60
+ "@typescript-eslint/no-empty-function": "error",
61
+ "@typescript-eslint/no-empty-interface": "error",
62
+ "@typescript-eslint/no-empty-object-type": "error",
63
+ "@typescript-eslint/no-explicit-any": "error",
64
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
65
+ "@typescript-eslint/no-extraneous-class": "error",
66
+ "@typescript-eslint/no-floating-promises": "error",
67
+ "@typescript-eslint/no-for-in-array": "error",
68
+ "no-implied-eval": "off",
69
+ "@typescript-eslint/no-implied-eval": "error",
70
+ "@typescript-eslint/no-import-type-side-effects": "error",
71
+ "@typescript-eslint/no-inferrable-types": "error",
72
+ "@typescript-eslint/no-invalid-void-type": "error",
73
+ "no-loop-func": "off",
74
+ "@typescript-eslint/no-loop-func": "error",
75
+ "no-loss-of-precision": "off",
76
+ "@typescript-eslint/no-loss-of-precision": "error",
77
+ "@typescript-eslint/no-meaningless-void-operator": [
78
+ "error",
79
+ {
80
+ checkNever: true,
81
+ },
82
+ ],
83
+ "@typescript-eslint/no-misused-new": "error",
84
+ "@typescript-eslint/no-mixed-enums": "error",
85
+ "@typescript-eslint/no-namespace": "error",
86
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
87
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
88
+ "@typescript-eslint/no-non-null-assertion": "error",
89
+ "no-redeclare": "off",
90
+ "@typescript-eslint/no-redeclare": "error",
91
+ "@typescript-eslint/no-redundant-type-constituents": "error",
92
+ "no-shadow": "off",
93
+ "@typescript-eslint/no-shadow": "error",
94
+ "@typescript-eslint/no-this-alias": "error",
95
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
96
+ "@typescript-eslint/no-unnecessary-condition": "error",
97
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment":
98
+ "error",
99
+ "@typescript-eslint/no-unnecessary-qualifier": "error",
100
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
101
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
102
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
103
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
104
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
105
+ "@typescript-eslint/no-unsafe-argument": "error",
106
+ "@typescript-eslint/no-unsafe-assignment": "error",
107
+ "@typescript-eslint/no-unsafe-call": "error",
108
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
109
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
110
+ "@typescript-eslint/no-unsafe-member-access": "error",
111
+ "@typescript-eslint/no-unsafe-return": "error",
112
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
113
+ "no-unused-expressions": "off",
114
+ "@typescript-eslint/no-unused-expressions": "error",
115
+ "no-useless-constructor": "off",
116
+ "@typescript-eslint/no-useless-constructor": "error",
117
+ "@typescript-eslint/no-useless-empty-export": "error",
118
+ "@typescript-eslint/non-nullable-type-assertion-style": "error",
119
+ "no-throw-literal": "off",
120
+ "@typescript-eslint/only-throw-error": "error",
121
+ "@typescript-eslint/prefer-as-const": "error",
122
+ "@typescript-eslint/prefer-enum-initializers": "error",
123
+ "@typescript-eslint/prefer-find": "error",
124
+ "@typescript-eslint/prefer-for-of": "error",
125
+ "@typescript-eslint/prefer-function-type": "error",
126
+ "@typescript-eslint/prefer-includes": "error",
127
+ "@typescript-eslint/prefer-literal-enum-member": "error",
128
+ "@typescript-eslint/prefer-namespace-keyword": "error",
129
+ "@typescript-eslint/prefer-nullish-coalescing": "error",
130
+ "@typescript-eslint/prefer-optional-chain": "error",
131
+ "prefer-promise-reject-errors": "off",
132
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
133
+ "@typescript-eslint/prefer-readonly": "error",
134
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
135
+ "@typescript-eslint/prefer-regexp-exec": "error",
136
+ "@typescript-eslint/prefer-return-this-type": "error",
137
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
138
+ "@typescript-eslint/promise-function-async": "error",
139
+ "@typescript-eslint/require-array-sort-compare": "error",
140
+ "require-await": "off",
141
+ "@typescript-eslint/require-await": "error",
142
+ "@typescript-eslint/unified-signatures": "error",
143
+ "@typescript-eslint/no-misused-promises": "error",
144
+ "@typescript-eslint/no-unused-vars": [
145
+ "error",
146
+ {
147
+ args: "all",
148
+ argsIgnorePattern: "^_",
149
+ caughtErrors: "all",
150
+ caughtErrorsIgnorePattern: "^_",
151
+ destructuredArrayIgnorePattern: "^_",
152
+ varsIgnorePattern: "^_",
153
+ ignoreRestSiblings: true,
154
+ },
155
+ ],
156
+ "no-use-before-define": "off",
157
+ "@typescript-eslint/no-use-before-define": "error",
158
+ "@typescript-eslint/restrict-plus-operands": "error",
159
+ "@typescript-eslint/restrict-template-expressions": [
160
+ "error",
161
+ {
162
+ allowAny: false,
163
+ allowBoolean: false,
164
+ allowNullish: false,
165
+ allowNumber: false,
166
+ allowRegExp: false,
167
+ allowNever: false,
168
+ },
169
+ ],
170
+ "no-return-await": "off",
171
+ "@typescript-eslint/return-await": "error",
172
+ "@typescript-eslint/strict-boolean-expressions": "error",
173
+ "@typescript-eslint/switch-exhaustiveness-check": [
174
+ "error",
175
+ {
176
+ allowDefaultCaseForExhaustiveSwitch: true,
177
+ requireDefaultForNonUnion: false,
178
+ },
179
+ ],
180
+ "@typescript-eslint/triple-slash-reference": "error",
181
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
182
+ },
183
+ }
@@ -0,0 +1,155 @@
1
+ /** @type {import("@types/eslint").ESLint.ConfigData} */
2
+ module.exports = {
3
+ plugins: ["unicorn"],
4
+ rules: {
5
+ "unicorn/better-regex": "error",
6
+ "unicorn/catch-error-name": "error",
7
+ "unicorn/consistent-destructuring": "error",
8
+ "unicorn/consistent-empty-array-spread": "error",
9
+ "unicorn/consistent-function-scoping": "error",
10
+ "unicorn/custom-error-definition": "error",
11
+ "unicorn/empty-brace-spaces": "error",
12
+ "unicorn/error-message": "error",
13
+ "unicorn/escape-case": "error",
14
+ "unicorn/explicit-length-check": "error",
15
+ "unicorn/filename-case": [
16
+ "error",
17
+ {
18
+ cases: {
19
+ camelCase: true,
20
+ pascalCase: true,
21
+ kebabCase: true,
22
+ },
23
+ },
24
+ ],
25
+ "unicorn/new-for-builtins": "error",
26
+ "unicorn/no-abusive-eslint-disable": "error",
27
+ "unicorn/no-anonymous-default-export": "error",
28
+ "unicorn/no-array-callback-reference": "error",
29
+ "unicorn/no-array-method-this-argument": "error",
30
+ "unicorn/no-array-push-push": "error",
31
+ "unicorn/no-array-reduce": "error",
32
+ "unicorn/no-await-expression-member": "error",
33
+ "unicorn/no-await-in-promise-methods": "error",
34
+ "unicorn/no-console-spaces": "error",
35
+ "unicorn/no-document-cookie": "error",
36
+ "unicorn/no-empty-file": "error",
37
+ "unicorn/no-for-loop": "error",
38
+ "unicorn/no-instanceof-array": "error",
39
+ "unicorn/no-invalid-fetch-options": "error",
40
+ "unicorn/no-invalid-remove-event-listener": "error",
41
+ // "unicorn/no-length-as-slice-end": "error", NOTE: not released yet
42
+ "unicorn/no-lonely-if": "error",
43
+ "unicorn/no-magic-array-flat-depth": "error",
44
+ "unicorn/no-negation-in-equality-check": "error",
45
+ "no-nested-ternary": "off",
46
+ "unicorn/no-nested-ternary": "error",
47
+ "unicorn/no-new-array": "error",
48
+ "unicorn/no-new-buffer": "error",
49
+ "unicorn/no-object-as-default-parameter": "error",
50
+ "unicorn/no-process-exit": "error",
51
+ "unicorn/no-single-promise-in-promise-methods": "error",
52
+ "unicorn/no-static-only-class": "error",
53
+ "unicorn/no-thenable": "error",
54
+ "unicorn/no-this-assignment": "error",
55
+ "unicorn/no-typeof-undefined": "error",
56
+ "unicorn/no-unnecessary-await": "error",
57
+ "unicorn/no-unnecessary-polyfills": "error",
58
+ "unicorn/no-unreadable-array-destructuring": "error",
59
+ "unicorn/no-unreadable-iife": "error",
60
+ "unicorn/no-unused-properties": "error",
61
+ "unicorn/no-useless-fallback-in-spread": "error",
62
+ "unicorn/no-useless-length-check": "error",
63
+ "unicorn/no-useless-promise-resolve-reject": "error",
64
+ "unicorn/no-useless-switch-case": "error",
65
+ "unicorn/no-useless-undefined": "error",
66
+ "unicorn/no-zero-fractions": "error",
67
+ "unicorn/number-literal-case": "error",
68
+ "unicorn/numeric-separators-style": "error",
69
+ "unicorn/prefer-array-find": "error",
70
+ "unicorn/prefer-array-flat": "error",
71
+ "unicorn/prefer-array-flat-map": "error",
72
+ "unicorn/prefer-array-index-of": "error",
73
+ "unicorn/prefer-array-some": "error",
74
+ "unicorn/prefer-at": "error",
75
+ "unicorn/prefer-blob-reading-methods": "error",
76
+ "unicorn/prefer-code-point": "error",
77
+ "unicorn/prefer-date-now": "error",
78
+ "unicorn/prefer-default-parameters": "error",
79
+ "unicorn/prefer-dom-node-append": "error",
80
+ "unicorn/prefer-dom-node-dataset": "error",
81
+ "unicorn/prefer-dom-node-remove": "error",
82
+ "unicorn/prefer-dom-node-text-content": "error",
83
+ "unicorn/prefer-event-target": "error",
84
+ "unicorn/prefer-export-from": ["error", { ignoreUsedVariables: true }],
85
+ "unicorn/prefer-includes": "error",
86
+ "unicorn/prefer-json-parse-buffer": "error",
87
+ "unicorn/prefer-keyboard-event-key": "error",
88
+ "unicorn/prefer-logical-operator-over-ternary": "error",
89
+ "unicorn/prefer-math-trunc": "error",
90
+ "unicorn/prefer-modern-dom-apis": "error",
91
+ "unicorn/prefer-modern-math-apis": "error",
92
+ "unicorn/prefer-native-coercion-functions": "error",
93
+ "unicorn/prefer-negative-index": "error",
94
+ "unicorn/prefer-node-protocol": "error",
95
+ "unicorn/prefer-number-properties": "error",
96
+ "unicorn/prefer-object-from-entries": "error",
97
+ "unicorn/prefer-optional-catch-binding": "error",
98
+ "unicorn/prefer-prototype-methods": "error",
99
+ "unicorn/prefer-query-selector": "error",
100
+ "unicorn/prefer-reflect-apply": "error",
101
+ "unicorn/prefer-regexp-test": "error",
102
+ "unicorn/prefer-set-has": "error",
103
+ "unicorn/prefer-set-size": "error",
104
+ "unicorn/prefer-spread": "error",
105
+ "unicorn/prefer-string-raw": "error",
106
+ "unicorn/prefer-string-replace-all": "error",
107
+ "unicorn/prefer-string-slice": "error",
108
+ "unicorn/prefer-string-starts-ends-with": "error",
109
+ "unicorn/prefer-string-trim-start-end": "error",
110
+ "unicorn/prefer-structured-clone": "error",
111
+ "unicorn/prefer-switch": "error",
112
+ "unicorn/prefer-ternary": "error",
113
+ "unicorn/prefer-top-level-await": "error",
114
+ "unicorn/prefer-type-error": "error",
115
+ "unicorn/relative-url-style": ["error", "always"],
116
+ "unicorn/require-array-join-separator": "error",
117
+ "unicorn/require-number-to-fixed-digits-argument": "error",
118
+ "unicorn/require-post-message-target-origin": "error",
119
+ "unicorn/switch-case-braces": ["error", "always"],
120
+ "unicorn/template-indent": [
121
+ "warn",
122
+ {
123
+ indent: 4,
124
+ },
125
+ ],
126
+ "unicorn/text-encoding-identifier-case": "error",
127
+ "unicorn/throw-new-error": "error",
128
+ "unicorn/prevent-abbreviations": [
129
+ "error",
130
+ {
131
+ allowList: {
132
+ Arg: true,
133
+ Args: true,
134
+ Param: true,
135
+ Params: true,
136
+ Prev: true,
137
+ Prop: true,
138
+ Props: true,
139
+ Ref: true,
140
+ Refs: true,
141
+ arg: true,
142
+ args: true,
143
+ env: true,
144
+ param: true,
145
+ params: true,
146
+ prev: true,
147
+ prop: true,
148
+ props: true,
149
+ ref: true,
150
+ refs: true,
151
+ },
152
+ },
153
+ ],
154
+ },
155
+ }
@@ -0,0 +1,7 @@
1
+ /** @type {import("@types/eslint").ESLint.ConfigData} */
2
+ module.exports = {
3
+ plugins: ["unused-imports"],
4
+ rules: {
5
+ "unused-imports/no-unused-imports": "error",
6
+ },
7
+ }
@@ -0,0 +1,19 @@
1
+ const { prettierPluginEmbed } = require("../plugins/embed.js")
2
+ const { prettierPluginSql } = require("../plugins/sql.js")
3
+ const { prettierPlugin } = require("../plugins/prettier.js")
4
+
5
+ /** @type {import("prettier").Config} */
6
+ module.exports = {
7
+ plugins: [
8
+ "@prettier/plugin-xml",
9
+ "prettier-plugin-prisma",
10
+ "prettier-plugin-sql",
11
+ "prettier-plugin-embed",
12
+ "prettier-plugin-jsdoc",
13
+ "prettier-plugin-packagejson",
14
+ "prettier-plugin-sh",
15
+ ],
16
+ ...prettierPlugin,
17
+ ...prettierPluginSql,
18
+ ...prettierPluginEmbed,
19
+ }
@@ -0,0 +1,8 @@
1
+ /** @type {import("prettier-plugin-embed").PrettierPluginEmbedOptions} */
2
+ const prettierPluginEmbed = {
3
+ embeddedSqlTags: ["sql"],
4
+ }
5
+
6
+ module.exports = {
7
+ prettierPluginEmbed,
8
+ }
@@ -0,0 +1,23 @@
1
+ /** @type {import("prettier").Config} */
2
+ const prettierPlugin = {
3
+ printWidth: 80,
4
+ tabWidth: 4,
5
+ useTabs: false,
6
+ semi: false,
7
+ singleQuote: false,
8
+ quoteProps: "as-needed",
9
+ jsxSingleQuote: false,
10
+ trailingComma: "all",
11
+ bracketSpacing: true,
12
+ bracketSameLine: false,
13
+ arrowParens: "always",
14
+ proseWrap: "always",
15
+ htmlWhitespaceSensitivity: "css",
16
+ endOfLine: "lf",
17
+ singleAttributePerLine: true,
18
+ embeddedLanguageFormatting: "auto",
19
+ }
20
+
21
+ module.exports = {
22
+ prettierPlugin,
23
+ }
@@ -0,0 +1,9 @@
1
+ /** @type {import("prettier-plugin-sql").SqlBaseOptions} */
2
+ const prettierPluginSql = {
3
+ language: "postgresql",
4
+ keywordCase: "upper",
5
+ }
6
+
7
+ module.exports = {
8
+ prettierPluginSql,
9
+ }
@@ -0,0 +1,16 @@
1
+ const { stylelint } = require("../plugins/stylelint")
2
+ const { stylelintOrder } = require("../plugins/order")
3
+
4
+ /** @type {import("stylelint").Config} */
5
+ module.exports = {
6
+ defaultSeverity: "error",
7
+ reportDescriptionlessDisables: true,
8
+ reportInvalidScopeDisables: true,
9
+ reportNeedlessDisables: true,
10
+ allowEmptyInput: true,
11
+ plugins: ["stylelint-order"],
12
+ rules: {
13
+ ...stylelint.rules,
14
+ ...stylelintOrder.rules,
15
+ },
16
+ }
@@ -0,0 +1,19 @@
1
+ /** @type {import("stylelint").Config} */
2
+ const stylelintOrder = {
3
+ rules: {
4
+ "order/order": [
5
+ "custom-properties",
6
+ "dollar-variables",
7
+ "at-variables",
8
+ "declarations",
9
+ "rules",
10
+ "at-rules",
11
+ "less-mixins",
12
+ ],
13
+ "order/properties-alphabetical-order": true,
14
+ },
15
+ }
16
+
17
+ module.exports = {
18
+ stylelintOrder,
19
+ }
@@ -0,0 +1,93 @@
1
+ /** @type {import("stylelint").Config} */
2
+ const stylelint = {
3
+ rules: {
4
+ "no-descending-specificity": true,
5
+ "declaration-block-no-duplicate-properties": true,
6
+ "font-family-no-duplicate-names": true,
7
+ "keyframe-block-no-duplicate-selectors": true,
8
+ "no-duplicate-at-import-rules": true,
9
+ "no-duplicate-selectors": true,
10
+ "block-no-empty": true,
11
+ "comment-no-empty": true,
12
+ "no-empty-source": true,
13
+ "color-no-invalid-hex": true,
14
+ "function-calc-no-unspaced-operator": true,
15
+ "keyframe-declaration-no-important": true,
16
+ "media-query-no-invalid": true,
17
+ "named-grid-areas-no-invalid": true,
18
+ "no-invalid-double-slash-comments": true,
19
+ "no-invalid-position-at-import-rule": true,
20
+ "string-no-newline": true,
21
+ "no-irregular-whitespace": true,
22
+ "custom-property-no-missing-var-function": true,
23
+ "font-family-no-missing-generic-family-keyword": true,
24
+ "function-linear-gradient-no-nonstandard-direction": true,
25
+ "declaration-block-no-shorthand-property-overrides": true,
26
+ "selector-anb-no-unmatchable": true,
27
+ "annotation-no-unknown": true,
28
+ "at-rule-no-unknown": true,
29
+ "declaration-property-value-no-unknown": true,
30
+ "function-no-unknown": true,
31
+ "media-feature-name-no-unknown": true,
32
+ "media-feature-name-value-no-unknown": true,
33
+ "no-unknown-animations": true,
34
+ "no-unknown-custom-media": true,
35
+ "no-unknown-custom-properties": true,
36
+ "property-no-unknown": true,
37
+ "selector-pseudo-class-no-unknown": true,
38
+ "selector-pseudo-element-no-unknown": true,
39
+ "selector-type-no-unknown": true,
40
+ "unit-no-unknown": true,
41
+ "at-rule-no-vendor-prefix": true,
42
+ "color-hex-alpha": "never",
43
+ "color-named": "never",
44
+ "declaration-no-important": true,
45
+ "function-url-no-scheme-relative": true,
46
+ "length-zero-no-unit": true,
47
+ "media-feature-name-no-vendor-prefix": true,
48
+ "property-no-vendor-prefix": true,
49
+ "selector-no-vendor-prefix": true,
50
+ "unit-allowed-list": ["px", "rem", "%"],
51
+ "value-no-vendor-prefix": true,
52
+ "function-name-case": "lower",
53
+ "selector-type-case": "lower",
54
+ "value-keyword-case": "lower",
55
+ "at-rule-empty-line-before": [
56
+ "always",
57
+ { ignore: ["first-nested", "after-comment"] },
58
+ ],
59
+ "comment-empty-line-before": ["always", { except: ["first-nested"] }],
60
+ "custom-property-empty-line-before": "never",
61
+ "rule-empty-line-before": [
62
+ "always",
63
+ {
64
+ except: ["after-single-line-comment"],
65
+ ignore: ["first-nested", "after-comment"],
66
+ },
67
+ ],
68
+ "number-max-precision": 3,
69
+ "alpha-value-notation": "percentage",
70
+ "color-function-notation": "modern",
71
+ "color-hex-length": "long",
72
+ "font-weight-notation": "numeric",
73
+ "hue-degree-notation": "angle",
74
+ "import-notation": "string",
75
+ "keyframe-selector-notation": "percentage",
76
+ "lightness-notation": "percentage",
77
+ "media-feature-range-notation": "prefix",
78
+ "selector-not-notation": "complex",
79
+ "selector-pseudo-element-colon-notation": "single",
80
+ "font-family-name-quotes": "always-where-required",
81
+ "function-url-quotes": "always",
82
+ "selector-attribute-quotes": "always",
83
+ "shorthand-property-no-redundant-values": true,
84
+ "declaration-block-no-redundant-longhand-properties": [
85
+ true,
86
+ { ignoreShorthands: "grid-template" },
87
+ ],
88
+ },
89
+ }
90
+
91
+ module.exports = {
92
+ stylelint,
93
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "jsx": "react",
4
+ "target": "es2016",
5
+ "module": "commonjs",
6
+ "esModuleInterop": true,
7
+ "noUncheckedIndexedAccess": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "strict": true,
10
+ "skipLibCheck": true
11
+ },
12
+ "include": ["src/**/*", "*.js", ".*.js"]
13
+ }