eslint-config-beslogic 2.0.0 → 2.0.1
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/.eslintrc.js +40 -40
- package/.vscode/extensions.json +49 -49
- package/.vscode/settings.json +157 -157
- package/CHANGELOG.md +14 -7
- package/LICENSE +9 -9
- package/README.md +213 -212
- package/angular.js +427 -406
- package/dprint.js +244 -244
- package/dprint.json +7 -7
- package/index.js +10 -10
- package/javascript.js +940 -939
- package/jest.js +83 -83
- package/json-like.js +34 -34
- package/lib/apply-patches.js +76 -76
- package/lib/patches/@angular+material/@angular+material+14.2.7.patch +13 -13
- package/lib/patches/@angular+material/@angular+material+15.1.2.patch +14 -14
- package/lib/patches/@angular+material/@angular+material+16.2.10.patch +13 -13
- package/lib/patches/@angular+material/@angular+material+17.2.0.patch +13 -13
- package/lib/patches/@nx+angular/@nx+angular+16.3.2.patch +56 -56
- package/lib/utils.js +26 -26
- package/mui.js +93 -92
- package/node-js.js +97 -95
- package/package.json +95 -95
- package/react-native.js +42 -42
- package/react-redux.js +29 -29
- package/react.js +220 -216
- package/rxjs.js +75 -75
- package/storybook.js +37 -36
- package/tsconfig.4.3.json +30 -30
- package/tsconfig.5.0.json +6 -6
- package/tsconfig.json +11 -11
- package/typescript.js +496 -495
package/.eslintrc.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Copyright 2024 Beslogic Inc.
|
|
3
|
-
|
|
4
|
-
/** @type {import("eslint").Linter.Config} */
|
|
5
|
-
module.exports = {
|
|
6
|
-
"root": true,
|
|
7
|
-
"plugins": ["eslint-plugin"],
|
|
8
|
-
"extends": [
|
|
9
|
-
"./node-js",
|
|
10
|
-
"plugin:eslint-plugin/all",
|
|
11
|
-
"./dprint",
|
|
12
|
-
"./json-like"
|
|
13
|
-
],
|
|
14
|
-
"parserOptions": {
|
|
15
|
-
"sourceType": "script"
|
|
16
|
-
},
|
|
17
|
-
"rules": {
|
|
18
|
-
"max-len": "off",
|
|
19
|
-
"max-lines": "off",
|
|
20
|
-
// We're a script project, using the console is fine
|
|
21
|
-
// (same config as in jest)
|
|
22
|
-
"no-console": [
|
|
23
|
-
"error",
|
|
24
|
-
{
|
|
25
|
-
"allow": [
|
|
26
|
-
"error",
|
|
27
|
-
"warn",
|
|
28
|
-
"info"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"no-magic-numbers": "off",
|
|
33
|
-
"unicorn/filename-case": [
|
|
34
|
-
"error",
|
|
35
|
-
{
|
|
36
|
-
"case": "kebabCase"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright 2024 Beslogic Inc.
|
|
3
|
+
|
|
4
|
+
/** @type {import("eslint").Linter.Config} */
|
|
5
|
+
module.exports = {
|
|
6
|
+
"root": true,
|
|
7
|
+
"plugins": ["eslint-plugin"],
|
|
8
|
+
"extends": [
|
|
9
|
+
"./node-js",
|
|
10
|
+
"plugin:eslint-plugin/all",
|
|
11
|
+
"./dprint",
|
|
12
|
+
"./json-like"
|
|
13
|
+
],
|
|
14
|
+
"parserOptions": {
|
|
15
|
+
"sourceType": "script"
|
|
16
|
+
},
|
|
17
|
+
"rules": {
|
|
18
|
+
"max-len": "off",
|
|
19
|
+
"max-lines": "off",
|
|
20
|
+
// We're a script project, using the console is fine
|
|
21
|
+
// (same config as in jest)
|
|
22
|
+
"no-console": [
|
|
23
|
+
"error",
|
|
24
|
+
{
|
|
25
|
+
"allow": [
|
|
26
|
+
"error",
|
|
27
|
+
"warn",
|
|
28
|
+
"info"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"no-magic-numbers": "off",
|
|
33
|
+
"unicorn/filename-case": [
|
|
34
|
+
"error",
|
|
35
|
+
{
|
|
36
|
+
"case": "kebabCase"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
package/.vscode/extensions.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Copyright 2024 Beslogic Inc.
|
|
3
|
-
// Keep in sync with https://dev.azure.com/Beslogic/Beslogic%20Architecture%20Templates/_wiki/wikis/Beslogic-Architecture-Templates.wiki/757/VSCode-settings-and-extensions-(.vscode-.code-workspace)
|
|
4
|
-
//
|
|
5
|
-
// Please keep in alphabetical order
|
|
6
|
-
{
|
|
7
|
-
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
|
8
|
-
// List of extensions which should be recommended for users of this workspace.
|
|
9
|
-
// Only keep those used by your specific project
|
|
10
|
-
"recommendations": [
|
|
11
|
-
// "angular.ng-template",
|
|
12
|
-
"davidanson.vscode-markdownlint",
|
|
13
|
-
"dbaeumer.vscode-eslint",
|
|
14
|
-
"dprint.dprint",
|
|
15
|
-
// "dotenv.dotenv-vscode",
|
|
16
|
-
"eamodio.gitlens",
|
|
17
|
-
// "firsttris.vscode-jest-runner",
|
|
18
|
-
// "ionic.ionic",
|
|
19
|
-
// "johnpapa.angular2",
|
|
20
|
-
"meganrogge.template-string-converter",
|
|
21
|
-
"ms-azure-devops.azure-pipelines",
|
|
22
|
-
// "nrwl.angular-console",
|
|
23
|
-
"pkief.material-icon-theme"
|
|
24
|
-
// "redhat.vscode-xml",
|
|
25
|
-
// "redhat.vscode-yaml",
|
|
26
|
-
// "webben.browserslist",
|
|
27
|
-
],
|
|
28
|
-
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
|
29
|
-
// Developpers should uninstall or disable the following extensions for this workspace
|
|
30
|
-
// https://github.com/microsoft/vscode/issues/40239
|
|
31
|
-
"unwantedRecommendations": [
|
|
32
|
-
"dotjoshjohnson.xml", // Prevent VSCode from recommending a different XML extension than the one we recommend
|
|
33
|
-
"esbenp.prettier-vscode", // Lots of conflicts
|
|
34
|
-
"ms-vscode.vscode-typescript-next", // Use workspace version instead
|
|
35
|
-
"mikestead.dotenv", // Use the official plugin instead
|
|
36
|
-
"orta.vscode-jest", // firsttris.vscode-jest-runner is preferable and doesn't have issues with parametrized tests
|
|
37
|
-
"rvest.vs-code-prettier-eslint", // Lots of conflicts
|
|
38
|
-
"sonarsource.sonarlint-vscode", // Not project-configurable. And the ESLint plugin is sufficient in JS/TS projects
|
|
39
|
-
"vscodevim.vim", // Recommended on MacOS
|
|
40
|
-
// VSCode has implemented an optimized version
|
|
41
|
-
"coenraads.bracket-pair-colorizer",
|
|
42
|
-
"coenraads.bracket-pair-colorizer-2",
|
|
43
|
-
"shardulm94.trailing-spaces",
|
|
44
|
-
// Everything below is Deprecated
|
|
45
|
-
"eg2.tslint",
|
|
46
|
-
"ms-vscode.vscode-typescript-tslint-plugin",
|
|
47
|
-
"simonsiefke.prettier-vscode"
|
|
48
|
-
]
|
|
49
|
-
}
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright 2024 Beslogic Inc.
|
|
3
|
+
// Keep in sync with https://dev.azure.com/Beslogic/Beslogic%20Architecture%20Templates/_wiki/wikis/Beslogic-Architecture-Templates.wiki/757/VSCode-settings-and-extensions-(.vscode-.code-workspace)
|
|
4
|
+
//
|
|
5
|
+
// Please keep in alphabetical order
|
|
6
|
+
{
|
|
7
|
+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
|
8
|
+
// List of extensions which should be recommended for users of this workspace.
|
|
9
|
+
// Only keep those used by your specific project
|
|
10
|
+
"recommendations": [
|
|
11
|
+
// "angular.ng-template",
|
|
12
|
+
"davidanson.vscode-markdownlint",
|
|
13
|
+
"dbaeumer.vscode-eslint",
|
|
14
|
+
"dprint.dprint",
|
|
15
|
+
// "dotenv.dotenv-vscode",
|
|
16
|
+
"eamodio.gitlens",
|
|
17
|
+
// "firsttris.vscode-jest-runner",
|
|
18
|
+
// "ionic.ionic",
|
|
19
|
+
// "johnpapa.angular2",
|
|
20
|
+
"meganrogge.template-string-converter",
|
|
21
|
+
"ms-azure-devops.azure-pipelines",
|
|
22
|
+
// "nrwl.angular-console",
|
|
23
|
+
"pkief.material-icon-theme"
|
|
24
|
+
// "redhat.vscode-xml",
|
|
25
|
+
// "redhat.vscode-yaml",
|
|
26
|
+
// "webben.browserslist",
|
|
27
|
+
],
|
|
28
|
+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
|
29
|
+
// Developpers should uninstall or disable the following extensions for this workspace
|
|
30
|
+
// https://github.com/microsoft/vscode/issues/40239
|
|
31
|
+
"unwantedRecommendations": [
|
|
32
|
+
"dotjoshjohnson.xml", // Prevent VSCode from recommending a different XML extension than the one we recommend
|
|
33
|
+
"esbenp.prettier-vscode", // Lots of conflicts
|
|
34
|
+
"ms-vscode.vscode-typescript-next", // Use workspace version instead
|
|
35
|
+
"mikestead.dotenv", // Use the official plugin instead
|
|
36
|
+
"orta.vscode-jest", // firsttris.vscode-jest-runner is preferable and doesn't have issues with parametrized tests
|
|
37
|
+
"rvest.vs-code-prettier-eslint", // Lots of conflicts
|
|
38
|
+
"sonarsource.sonarlint-vscode", // Not project-configurable. And the ESLint plugin is sufficient in JS/TS projects
|
|
39
|
+
"vscodevim.vim", // Recommended on MacOS
|
|
40
|
+
// VSCode has implemented an optimized version
|
|
41
|
+
"coenraads.bracket-pair-colorizer",
|
|
42
|
+
"coenraads.bracket-pair-colorizer-2",
|
|
43
|
+
"shardulm94.trailing-spaces",
|
|
44
|
+
// Everything below is Deprecated
|
|
45
|
+
"eg2.tslint",
|
|
46
|
+
"ms-vscode.vscode-typescript-tslint-plugin",
|
|
47
|
+
"simonsiefke.prettier-vscode"
|
|
48
|
+
]
|
|
49
|
+
}
|
package/.vscode/settings.json
CHANGED
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Copyright 2024 Beslogic Inc.
|
|
3
|
-
// Keep in sync with https://dev.azure.com/Beslogic/Beslogic%20Architecture%20Templates/_wiki/wikis/Beslogic-Architecture-Templates.wiki/757/VSCode-settings-and-extensions-(.vscode-.code-workspace)
|
|
4
|
-
|
|
5
|
-
{
|
|
6
|
-
"files.associations": {
|
|
7
|
-
".eslintrc*.json": "jsonc",
|
|
8
|
-
"dprint*.json": "jsonc"
|
|
9
|
-
},
|
|
10
|
-
"files.exclude": {
|
|
11
|
-
"*.zip": true,
|
|
12
|
-
"**/node_modules": false,
|
|
13
|
-
"**/build": true,
|
|
14
|
-
"**/dist/**/*.min.js": true,
|
|
15
|
-
"**/dist/**/*.map": true,
|
|
16
|
-
"**/src/react-app-env.d.ts": true
|
|
17
|
-
},
|
|
18
|
-
"search.exclude": {
|
|
19
|
-
"**/node_modules": true,
|
|
20
|
-
"**/bower_components": true,
|
|
21
|
-
"**/*.code-search": true,
|
|
22
|
-
"package-lock.json": true,
|
|
23
|
-
"*.lock": true
|
|
24
|
-
},
|
|
25
|
-
"editor.rulers": [
|
|
26
|
-
80,
|
|
27
|
-
100
|
|
28
|
-
],
|
|
29
|
-
"[git-commit]": {
|
|
30
|
-
"editor.rulers": [
|
|
31
|
-
72
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"editor.detectIndentation": false,
|
|
35
|
-
"editor.tabSize": 2,
|
|
36
|
-
"editor.insertSpaces": true,
|
|
37
|
-
"files.eol": "\n",
|
|
38
|
-
"files.insertFinalNewline": true,
|
|
39
|
-
"files.trimFinalNewlines": true,
|
|
40
|
-
"files.trimTrailingWhitespace": true,
|
|
41
|
-
"editor.bracketPairColorization.enabled": true,
|
|
42
|
-
"editor.formatOnSave": true,
|
|
43
|
-
"editor.codeActionsOnSave": {
|
|
44
|
-
"source.fixAll": "explicit",
|
|
45
|
-
// "source.*Imports": https://github.com/microsoft/TypeScript/pull/50931#issuecomment-1416288712
|
|
46
|
-
// Let dedicated imports tool deal with it
|
|
47
|
-
"source.organizeImports": "never",
|
|
48
|
-
"source.sortImports": "never",
|
|
49
|
-
// IDEM, but also it's annoying to remove imports because of commented code while testing
|
|
50
|
-
"source.removeUnusedImports": "never"
|
|
51
|
-
},
|
|
52
|
-
// Set the default formatter to help avoid Prettier
|
|
53
|
-
// NOTE: due to a bug in VSCode, we have to specify these individually to ensure it overrides user settings
|
|
54
|
-
// Please upvote: https://github.com/microsoft/vscode/issues/168411
|
|
55
|
-
"[json]": {
|
|
56
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
57
|
-
},
|
|
58
|
-
"[jsonc]": {
|
|
59
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
60
|
-
},
|
|
61
|
-
"[javascript]": {
|
|
62
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
63
|
-
},
|
|
64
|
-
"[javascriptreact]": {
|
|
65
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
66
|
-
},
|
|
67
|
-
"[typescript]": {
|
|
68
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
69
|
-
},
|
|
70
|
-
"[typescriptreact]": {
|
|
71
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
72
|
-
},
|
|
73
|
-
"[markdown]": {
|
|
74
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
75
|
-
},
|
|
76
|
-
"[dockerfile]": {
|
|
77
|
-
"editor.defaultFormatter": "dprint.dprint"
|
|
78
|
-
},
|
|
79
|
-
// Specify the formatter in case other formatters are also installed (ie: Prettier)
|
|
80
|
-
"[html]": {
|
|
81
|
-
"editor.defaultFormatter": "vscode.html-language-features"
|
|
82
|
-
},
|
|
83
|
-
// TODO: Configure stylelint or dprint-prettier so I can recommend it
|
|
84
|
-
"[css]": {
|
|
85
|
-
"editor.defaultFormatter": "vscode.css-language-features"
|
|
86
|
-
},
|
|
87
|
-
"[scss]": {
|
|
88
|
-
"editor.defaultFormatter": "vscode.css-language-features"
|
|
89
|
-
},
|
|
90
|
-
"[postcss]": {
|
|
91
|
-
"editor.defaultFormatter": "vscode.css-language-features"
|
|
92
|
-
},
|
|
93
|
-
"[less]": {
|
|
94
|
-
"editor.defaultFormatter": "vscode.css-language-features"
|
|
95
|
-
},
|
|
96
|
-
"[yaml]": {
|
|
97
|
-
"editor.defaultFormatter": "redhat.vscode-yaml"
|
|
98
|
-
},
|
|
99
|
-
"[xml]": {
|
|
100
|
-
"editor.defaultFormatter": "redhat.vscode-xml"
|
|
101
|
-
},
|
|
102
|
-
// The following is only needed without dprint
|
|
103
|
-
// "[json][jsonc]": {
|
|
104
|
-
// "editor.defaultFormatter": "vscode.json-language-features"
|
|
105
|
-
// },
|
|
106
|
-
// "[javascript][javascriptreact][typescript][typescriptreact]": {
|
|
107
|
-
// "editor.defaultFormatter": "vscode.typescript-language-features"
|
|
108
|
-
// },
|
|
109
|
-
// "[markdown]": {
|
|
110
|
-
// "files.trimTrailingWhitespace": false,
|
|
111
|
-
// },
|
|
112
|
-
"dprint.path": "node_modules/dprint/dprint",
|
|
113
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
114
|
-
"typescript.enablePromptUseWorkspaceTsdk": true,
|
|
115
|
-
"js/ts.implicitProjectConfig.checkJs": true,
|
|
116
|
-
"javascript.preferences.quoteStyle": "single",
|
|
117
|
-
"typescript.preferences.quoteStyle": "single",
|
|
118
|
-
"html.format.wrapAttributes": "force-expand-multiline",
|
|
119
|
-
// js/ts.format.* neededed without dprint
|
|
120
|
-
// "javascript.format.semicolons": "remove",
|
|
121
|
-
// "typescript.format.semicolons": "remove",
|
|
122
|
-
// "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
|
|
123
|
-
// "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
|
|
124
|
-
"javascript.preferences.importModuleSpecifier": "non-relative",
|
|
125
|
-
"typescript.preferences.importModuleSpecifier": "non-relative",
|
|
126
|
-
"eslint.validate": [
|
|
127
|
-
// For Angular: "html",
|
|
128
|
-
"javascript",
|
|
129
|
-
"javascriptreact",
|
|
130
|
-
"typescript",
|
|
131
|
-
"typescriptreact"
|
|
132
|
-
],
|
|
133
|
-
"eslint.workingDirectories": [
|
|
134
|
-
{
|
|
135
|
-
"mode": "auto"
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
"eslint.codeActionsOnSave.rules": [
|
|
139
|
-
// Clearing imports and unused vars because of commented code while testing is annoying
|
|
140
|
-
"!unused-imports/no-unused-imports",
|
|
141
|
-
"!autofix/no-debugger",
|
|
142
|
-
"!autofix/no-unused-vars",
|
|
143
|
-
"*"
|
|
144
|
-
],
|
|
145
|
-
"eslint.rules.customizations": [
|
|
146
|
-
{
|
|
147
|
-
"rule": "*",
|
|
148
|
-
"severity": "downgrade"
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
"jest.autoRun": "off",
|
|
152
|
-
"less.format.spaceAroundSelectorSeparator": true,
|
|
153
|
-
"css.format.spaceAroundSelectorSeparator": true,
|
|
154
|
-
"scss.format.spaceAroundSelectorSeparator": true,
|
|
155
|
-
"xml.codeLens.enabled": true,
|
|
156
|
-
"xml.format.maxLineWidth": 100
|
|
157
|
-
}
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright 2024 Beslogic Inc.
|
|
3
|
+
// Keep in sync with https://dev.azure.com/Beslogic/Beslogic%20Architecture%20Templates/_wiki/wikis/Beslogic-Architecture-Templates.wiki/757/VSCode-settings-and-extensions-(.vscode-.code-workspace)
|
|
4
|
+
|
|
5
|
+
{
|
|
6
|
+
"files.associations": {
|
|
7
|
+
".eslintrc*.json": "jsonc",
|
|
8
|
+
"dprint*.json": "jsonc"
|
|
9
|
+
},
|
|
10
|
+
"files.exclude": {
|
|
11
|
+
"*.zip": true,
|
|
12
|
+
"**/node_modules": false,
|
|
13
|
+
"**/build": true,
|
|
14
|
+
"**/dist/**/*.min.js": true,
|
|
15
|
+
"**/dist/**/*.map": true,
|
|
16
|
+
"**/src/react-app-env.d.ts": true
|
|
17
|
+
},
|
|
18
|
+
"search.exclude": {
|
|
19
|
+
"**/node_modules": true,
|
|
20
|
+
"**/bower_components": true,
|
|
21
|
+
"**/*.code-search": true,
|
|
22
|
+
"package-lock.json": true,
|
|
23
|
+
"*.lock": true
|
|
24
|
+
},
|
|
25
|
+
"editor.rulers": [
|
|
26
|
+
80,
|
|
27
|
+
100
|
|
28
|
+
],
|
|
29
|
+
"[git-commit]": {
|
|
30
|
+
"editor.rulers": [
|
|
31
|
+
72
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"editor.detectIndentation": false,
|
|
35
|
+
"editor.tabSize": 2,
|
|
36
|
+
"editor.insertSpaces": true,
|
|
37
|
+
"files.eol": "\n",
|
|
38
|
+
"files.insertFinalNewline": true,
|
|
39
|
+
"files.trimFinalNewlines": true,
|
|
40
|
+
"files.trimTrailingWhitespace": true,
|
|
41
|
+
"editor.bracketPairColorization.enabled": true,
|
|
42
|
+
"editor.formatOnSave": true,
|
|
43
|
+
"editor.codeActionsOnSave": {
|
|
44
|
+
"source.fixAll": "explicit",
|
|
45
|
+
// "source.*Imports": https://github.com/microsoft/TypeScript/pull/50931#issuecomment-1416288712
|
|
46
|
+
// Let dedicated imports tool deal with it
|
|
47
|
+
"source.organizeImports": "never",
|
|
48
|
+
"source.sortImports": "never",
|
|
49
|
+
// IDEM, but also it's annoying to remove imports because of commented code while testing
|
|
50
|
+
"source.removeUnusedImports": "never"
|
|
51
|
+
},
|
|
52
|
+
// Set the default formatter to help avoid Prettier
|
|
53
|
+
// NOTE: due to a bug in VSCode, we have to specify these individually to ensure it overrides user settings
|
|
54
|
+
// Please upvote: https://github.com/microsoft/vscode/issues/168411
|
|
55
|
+
"[json]": {
|
|
56
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
57
|
+
},
|
|
58
|
+
"[jsonc]": {
|
|
59
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
60
|
+
},
|
|
61
|
+
"[javascript]": {
|
|
62
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
63
|
+
},
|
|
64
|
+
"[javascriptreact]": {
|
|
65
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
66
|
+
},
|
|
67
|
+
"[typescript]": {
|
|
68
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
69
|
+
},
|
|
70
|
+
"[typescriptreact]": {
|
|
71
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
72
|
+
},
|
|
73
|
+
"[markdown]": {
|
|
74
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
75
|
+
},
|
|
76
|
+
"[dockerfile]": {
|
|
77
|
+
"editor.defaultFormatter": "dprint.dprint"
|
|
78
|
+
},
|
|
79
|
+
// Specify the formatter in case other formatters are also installed (ie: Prettier)
|
|
80
|
+
"[html]": {
|
|
81
|
+
"editor.defaultFormatter": "vscode.html-language-features"
|
|
82
|
+
},
|
|
83
|
+
// TODO: Configure stylelint or dprint-prettier so I can recommend it
|
|
84
|
+
"[css]": {
|
|
85
|
+
"editor.defaultFormatter": "vscode.css-language-features"
|
|
86
|
+
},
|
|
87
|
+
"[scss]": {
|
|
88
|
+
"editor.defaultFormatter": "vscode.css-language-features"
|
|
89
|
+
},
|
|
90
|
+
"[postcss]": {
|
|
91
|
+
"editor.defaultFormatter": "vscode.css-language-features"
|
|
92
|
+
},
|
|
93
|
+
"[less]": {
|
|
94
|
+
"editor.defaultFormatter": "vscode.css-language-features"
|
|
95
|
+
},
|
|
96
|
+
"[yaml]": {
|
|
97
|
+
"editor.defaultFormatter": "redhat.vscode-yaml"
|
|
98
|
+
},
|
|
99
|
+
"[xml]": {
|
|
100
|
+
"editor.defaultFormatter": "redhat.vscode-xml"
|
|
101
|
+
},
|
|
102
|
+
// The following is only needed without dprint
|
|
103
|
+
// "[json][jsonc]": {
|
|
104
|
+
// "editor.defaultFormatter": "vscode.json-language-features"
|
|
105
|
+
// },
|
|
106
|
+
// "[javascript][javascriptreact][typescript][typescriptreact]": {
|
|
107
|
+
// "editor.defaultFormatter": "vscode.typescript-language-features"
|
|
108
|
+
// },
|
|
109
|
+
// "[markdown]": {
|
|
110
|
+
// "files.trimTrailingWhitespace": false,
|
|
111
|
+
// },
|
|
112
|
+
"dprint.path": "node_modules/dprint/dprint",
|
|
113
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
114
|
+
"typescript.enablePromptUseWorkspaceTsdk": true,
|
|
115
|
+
"js/ts.implicitProjectConfig.checkJs": true,
|
|
116
|
+
"javascript.preferences.quoteStyle": "single",
|
|
117
|
+
"typescript.preferences.quoteStyle": "single",
|
|
118
|
+
"html.format.wrapAttributes": "force-expand-multiline",
|
|
119
|
+
// js/ts.format.* neededed without dprint
|
|
120
|
+
// "javascript.format.semicolons": "remove",
|
|
121
|
+
// "typescript.format.semicolons": "remove",
|
|
122
|
+
// "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
|
|
123
|
+
// "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
|
|
124
|
+
"javascript.preferences.importModuleSpecifier": "non-relative",
|
|
125
|
+
"typescript.preferences.importModuleSpecifier": "non-relative",
|
|
126
|
+
"eslint.validate": [
|
|
127
|
+
// For Angular: "html",
|
|
128
|
+
"javascript",
|
|
129
|
+
"javascriptreact",
|
|
130
|
+
"typescript",
|
|
131
|
+
"typescriptreact"
|
|
132
|
+
],
|
|
133
|
+
"eslint.workingDirectories": [
|
|
134
|
+
{
|
|
135
|
+
"mode": "auto"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"eslint.codeActionsOnSave.rules": [
|
|
139
|
+
// Clearing imports and unused vars because of commented code while testing is annoying
|
|
140
|
+
"!unused-imports/no-unused-imports",
|
|
141
|
+
"!autofix/no-debugger",
|
|
142
|
+
"!autofix/no-unused-vars",
|
|
143
|
+
"*"
|
|
144
|
+
],
|
|
145
|
+
"eslint.rules.customizations": [
|
|
146
|
+
{
|
|
147
|
+
"rule": "*",
|
|
148
|
+
"severity": "downgrade"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"jest.autoRun": "off",
|
|
152
|
+
"less.format.spaceAroundSelectorSeparator": true,
|
|
153
|
+
"css.format.spaceAroundSelectorSeparator": true,
|
|
154
|
+
"scss.format.spaceAroundSelectorSeparator": true,
|
|
155
|
+
"xml.codeLens.enabled": true,
|
|
156
|
+
"xml.format.maxLineWidth": 100
|
|
157
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 2.0.
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
- Disabled the following rules in Storybook stories:
|
|
6
|
+
- `@angular-eslint/component-max-inline-declarations`
|
|
7
|
+
- `angular-file-naming/component-filename-suffix`
|
|
8
|
+
- Clarified that `beslogic/storybook` preset should be added to Angular project as well.
|
|
9
|
+
|
|
10
|
+
## 2.0.0
|
|
11
|
+
|
|
12
|
+
- Created CHANGELOG.md
|
|
13
|
+
- Changed the maximum line length from `120` to `100`
|
|
14
|
+
- Split language-specific `editor.defaultFormatter` to work around <https://github.com/microsoft/vscode/issues/168411>
|
package/LICENSE
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
The MIT License
|
|
2
|
-
|
|
3
|
-
Copyright 2024 Beslogic Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2024 Beslogic Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|