@dvukovic/style-guide 0.1.1 → 0.3.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.
- package/README.md +122 -2
- package/package.json +82 -42
- package/src/cspell/base.txt +3 -0
- package/src/eslint/configs/core.js +2 -1
- package/src/eslint/configs/typescript.js +7 -0
- package/src/eslint/plugins/eslint.js +117 -47
- package/src/eslint/plugins/etc.js +0 -3
- package/src/eslint/plugins/import-x.js +12 -14
- package/src/eslint/plugins/jest.js +6 -6
- package/src/eslint/plugins/next.js +1 -1
- package/src/eslint/plugins/promise.js +0 -1
- package/src/eslint/plugins/react.js +3 -5
- package/src/eslint/plugins/sonarjs.js +6 -6
- package/src/eslint/plugins/sort-destructure-keys.js +7 -0
- package/src/eslint/{configs/react-typescript.js → plugins/sort-keys-fix.js} +2 -1
- package/src/eslint/plugins/typescript-eslint.js +51 -36
- package/src/eslint/plugins/typescript-sort-keys.js +8 -0
- package/src/eslint/plugins/unicorn.js +16 -17
- package/src/package-json/configs/core.js +10 -0
- package/src/package-json/plugins/package-json.js +85 -0
- package/src/prettier/plugins/prettier.js +12 -12
- package/src/prettier/plugins/sql.js +1 -1
- package/src/stylelint/configs/core.js +2 -2
- package/src/stylelint/plugins/stylelint.js +60 -60
- package/.eslintrc.js +0 -26
- package/.github/workflows/defalt.yml +0 -49
- package/.prettierignore +0 -1
- package/.prettierrc.js +0 -4
- package/.release-it.json +0 -15
- package/.stylelintrc.js +0 -4
- package/.yarnrc.yml +0 -1
- package/CHANGELOG.md +0 -8
- package/cspell.config.js +0 -17
- package/src/__tests__/Dockerfile +0 -8
- package/src/__tests__/component.tsx +0 -14
- package/src/__tests__/db.sql +0 -4
- package/src/__tests__/schema.prisma +0 -14
- package/src/__tests__/script.js +0 -6
- package/src/__tests__/script.sh +0 -3
- package/src/__tests__/script.test.js +0 -13
- package/src/__tests__/structure.xml +0 -7
- package/src/__tests__/style.css +0 -74
- package/src/__tests__/typed.ts +0 -5
- package/tsconfig.json +0 -13
|
@@ -1,63 +1,68 @@
|
|
|
1
1
|
/** @type {import("stylelint").Config} */
|
|
2
2
|
const stylelint = {
|
|
3
3
|
rules: {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
"alpha-value-notation": "percentage",
|
|
5
|
+
"annotation-no-unknown": true,
|
|
6
|
+
"at-rule-empty-line-before": [
|
|
7
|
+
"always",
|
|
8
|
+
{ ignore: ["first-nested", "after-comment"] },
|
|
9
|
+
],
|
|
10
|
+
"at-rule-no-unknown": true,
|
|
11
|
+
"at-rule-no-vendor-prefix": true,
|
|
10
12
|
"block-no-empty": true,
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
+
"color-function-notation": "modern",
|
|
14
|
+
"color-hex-alpha": "never",
|
|
15
|
+
"color-hex-length": "long",
|
|
16
|
+
"color-named": "never",
|
|
13
17
|
"color-no-invalid-hex": true,
|
|
18
|
+
"comment-empty-line-before": ["always", { except: ["first-nested"] }],
|
|
19
|
+
"comment-no-empty": true,
|
|
20
|
+
"custom-property-empty-line-before": "never",
|
|
21
|
+
"custom-property-no-missing-var-function": true,
|
|
22
|
+
"declaration-block-no-duplicate-properties": true,
|
|
23
|
+
"declaration-block-no-redundant-longhand-properties": [
|
|
24
|
+
true,
|
|
25
|
+
{ ignoreShorthands: "grid-template" },
|
|
26
|
+
],
|
|
27
|
+
"declaration-block-no-shorthand-property-overrides": true,
|
|
28
|
+
"declaration-no-important": true,
|
|
29
|
+
"declaration-property-value-no-unknown": true,
|
|
30
|
+
"font-family-name-quotes": "always-where-required",
|
|
31
|
+
"font-family-no-duplicate-names": true,
|
|
32
|
+
"font-family-no-missing-generic-family-keyword": true,
|
|
33
|
+
"font-weight-notation": "numeric",
|
|
14
34
|
"function-calc-no-unspaced-operator": true,
|
|
35
|
+
"function-linear-gradient-no-nonstandard-direction": true,
|
|
36
|
+
"function-name-case": "lower",
|
|
37
|
+
"function-no-unknown": true,
|
|
38
|
+
"function-url-no-scheme-relative": true,
|
|
39
|
+
"function-url-quotes": "always",
|
|
40
|
+
"hue-degree-notation": "angle",
|
|
41
|
+
"import-notation": "string",
|
|
42
|
+
"keyframe-block-no-duplicate-selectors": true,
|
|
15
43
|
"keyframe-declaration-no-important": true,
|
|
44
|
+
"keyframe-selector-notation": "percentage",
|
|
45
|
+
"length-zero-no-unit": true,
|
|
46
|
+
"lightness-notation": "percentage",
|
|
47
|
+
"media-feature-name-no-unknown": true,
|
|
48
|
+
"media-feature-name-no-vendor-prefix": true,
|
|
49
|
+
"media-feature-name-value-no-unknown": true,
|
|
50
|
+
"media-feature-range-notation": "prefix",
|
|
16
51
|
"media-query-no-invalid": true,
|
|
17
52
|
"named-grid-areas-no-invalid": true,
|
|
53
|
+
"no-descending-specificity": true,
|
|
54
|
+
"no-duplicate-at-import-rules": true,
|
|
55
|
+
"no-duplicate-selectors": true,
|
|
56
|
+
"no-empty-source": true,
|
|
18
57
|
"no-invalid-double-slash-comments": true,
|
|
19
58
|
"no-invalid-position-at-import-rule": true,
|
|
20
|
-
"string-no-newline": true,
|
|
21
59
|
"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
60
|
"no-unknown-animations": true,
|
|
34
61
|
"no-unknown-custom-media": true,
|
|
35
62
|
"no-unknown-custom-properties": true,
|
|
63
|
+
"number-max-precision": 3,
|
|
36
64
|
"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
65
|
"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
66
|
"rule-empty-line-before": [
|
|
62
67
|
"always",
|
|
63
68
|
{
|
|
@@ -65,26 +70,21 @@ const stylelint = {
|
|
|
65
70
|
ignore: ["first-nested", "after-comment"],
|
|
66
71
|
},
|
|
67
72
|
],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
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",
|
|
73
|
+
"selector-anb-no-unmatchable": true,
|
|
74
|
+
"selector-attribute-quotes": "always",
|
|
75
|
+
"selector-no-vendor-prefix": true,
|
|
78
76
|
"selector-not-notation": "complex",
|
|
77
|
+
"selector-pseudo-class-no-unknown": true,
|
|
79
78
|
"selector-pseudo-element-colon-notation": "single",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"selector-
|
|
79
|
+
"selector-pseudo-element-no-unknown": true,
|
|
80
|
+
"selector-type-case": "lower",
|
|
81
|
+
"selector-type-no-unknown": true,
|
|
83
82
|
"shorthand-property-no-redundant-values": true,
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
"string-no-newline": true,
|
|
84
|
+
"unit-allowed-list": ["px", "rem", "%"],
|
|
85
|
+
"unit-no-unknown": true,
|
|
86
|
+
"value-keyword-case": "lower",
|
|
87
|
+
"value-no-vendor-prefix": true,
|
|
88
88
|
},
|
|
89
89
|
}
|
|
90
90
|
|
package/.eslintrc.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/** @type {import("@types/eslint").ESLint.ConfigData} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
root: true,
|
|
4
|
-
parser: "@typescript-eslint/parser",
|
|
5
|
-
ignorePatterns: ["node_modules"],
|
|
6
|
-
extends: [
|
|
7
|
-
"./src/eslint/configs/core.js",
|
|
8
|
-
"./src/eslint/configs/node.js",
|
|
9
|
-
"./src/eslint/configs/mobx.js",
|
|
10
|
-
"./src/eslint/configs/react.js",
|
|
11
|
-
"./src/eslint/configs/next.js",
|
|
12
|
-
],
|
|
13
|
-
parserOptions: {
|
|
14
|
-
project: "./tsconfig.json",
|
|
15
|
-
},
|
|
16
|
-
overrides: [
|
|
17
|
-
{
|
|
18
|
-
files: ["*.ts", ".js"],
|
|
19
|
-
extends: ["./src/eslint/configs/react-typescript.js"],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
files: ["*.test.ts", "*.test.js"],
|
|
23
|
-
extends: ["./src/eslint/configs/jest.js"],
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: Default
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
pull_request:
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
lint:
|
|
12
|
-
name: Lint
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- name: Enable Corepack
|
|
16
|
-
run: corepack enable
|
|
17
|
-
- uses: actions/checkout@v4
|
|
18
|
-
- uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
registry-url: "https://registry.npmjs.org"
|
|
21
|
-
node-version: 20.x
|
|
22
|
-
cache: yarn
|
|
23
|
-
- run: yarn
|
|
24
|
-
- run: yarn lint
|
|
25
|
-
|
|
26
|
-
release:
|
|
27
|
-
name: Release
|
|
28
|
-
needs: [lint]
|
|
29
|
-
if: github.ref == 'refs/heads/master'
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
steps:
|
|
32
|
-
- name: Enable Corepack
|
|
33
|
-
run: corepack enable
|
|
34
|
-
- uses: actions/checkout@v4
|
|
35
|
-
- uses: actions/setup-node@v4
|
|
36
|
-
with:
|
|
37
|
-
registry-url: "https://registry.npmjs.org"
|
|
38
|
-
node-version: 20.x
|
|
39
|
-
cache: yarn
|
|
40
|
-
- name: git config
|
|
41
|
-
run: |
|
|
42
|
-
git config user.name "${GITHUB_ACTOR}"
|
|
43
|
-
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
44
|
-
- run: yarn
|
|
45
|
-
- run: yarn release --ci
|
|
46
|
-
env:
|
|
47
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
48
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
49
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/.prettierignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CHANGELOG.md
|
package/.prettierrc.js
DELETED
package/.release-it.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://unpkg.com/release-it/schema/release-it.json",
|
|
3
|
-
"github": {
|
|
4
|
-
"release": true
|
|
5
|
-
},
|
|
6
|
-
"plugins": {
|
|
7
|
-
"@release-it/conventional-changelog": {
|
|
8
|
-
"infile": "CHANGELOG.md",
|
|
9
|
-
"header": "# Changelog",
|
|
10
|
-
"preset": {
|
|
11
|
-
"name": "conventionalcommits"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
package/.stylelintrc.js
DELETED
package/.yarnrc.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodeLinker: node-modules
|
package/CHANGELOG.md
DELETED
package/cspell.config.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** @type {import("cspell").FileSettings} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
useGitignore: true,
|
|
4
|
-
cache: {
|
|
5
|
-
useCache: true,
|
|
6
|
-
cacheLocation: "./node_modules/.cache/cspell",
|
|
7
|
-
},
|
|
8
|
-
dictionaryDefinitions: [
|
|
9
|
-
{
|
|
10
|
-
name: "shared",
|
|
11
|
-
path: "./src/cspell/base.txt",
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
caseSensitive: false,
|
|
15
|
-
ignorePaths: ["./src/cspell/base.txt"],
|
|
16
|
-
dictionaries: ["shared"],
|
|
17
|
-
}
|
package/src/__tests__/Dockerfile
DELETED
package/src/__tests__/db.sql
DELETED
package/src/__tests__/script.js
DELETED
package/src/__tests__/script.sh
DELETED
package/src/__tests__/style.css
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--orange-1: #ffa500;
|
|
3
|
-
--yellow-1: #f9b916;
|
|
4
|
-
--black: #000000;
|
|
5
|
-
--gray-1: #c6c6c6;
|
|
6
|
-
--gray-2: #515151;
|
|
7
|
-
--gray-3: #e5e5e5;
|
|
8
|
-
--gray-4: #f2f4f4;
|
|
9
|
-
--gray-5: #767676;
|
|
10
|
-
--green-1: #2aa83f;
|
|
11
|
-
--blue-1: #307cff;
|
|
12
|
-
--pink-1: #f6eeff;
|
|
13
|
-
--purple-1: #be16f9;
|
|
14
|
-
--purple-2: #7e30f5;
|
|
15
|
-
--purple-3: #312665;
|
|
16
|
-
--purple-4: #f6eeff;
|
|
17
|
-
--red-1: #fc3e1c;
|
|
18
|
-
--white: #ffffff;
|
|
19
|
-
--shadow-1: 0 4px 4px 0 rgb(0 0 0 / 8%);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.container {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
padding: 25px;
|
|
26
|
-
row-gap: 23px;
|
|
27
|
-
width: 100%;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.title {
|
|
31
|
-
font-size: 1.25rem;
|
|
32
|
-
font-weight: 500;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.infoContainer {
|
|
36
|
-
font-weight: 400;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.infoLink {
|
|
40
|
-
color: var(--gray-2);
|
|
41
|
-
text-decoration: underline;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.header {
|
|
45
|
-
align-items: center;
|
|
46
|
-
display: flex;
|
|
47
|
-
justify-content: space-between;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.headerLeftSection {
|
|
51
|
-
align-items: center;
|
|
52
|
-
column-gap: 20px;
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: flex-start;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.map {
|
|
58
|
-
height: 550px;
|
|
59
|
-
width: 100%;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.mapContainer {
|
|
63
|
-
background-color: var(--white);
|
|
64
|
-
padding: 13px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.itemsContainer {
|
|
68
|
-
background-color: var(--white);
|
|
69
|
-
min-height: 200px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
a {
|
|
73
|
-
color: #ffffff;
|
|
74
|
-
}
|
package/src/__tests__/typed.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|