@ronas-it/nx-generators 0.11.1 → 0.12.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/package.json +1 -1
- package/src/generators/code-checks/files/.eslint.ronasit.cjs.template +337 -0
- package/src/generators/code-checks/files/eslint.config.cjs.template +204 -0
- package/src/generators/code-checks/files/eslint.constraints.json.template +30 -0
- package/src/generators/code-checks/generator.js +1 -10
- package/src/generators/code-checks/generator.js.map +1 -1
- package/src/generators/code-checks/scripts.js +1 -1
- package/src/generators/code-checks/scripts.js.map +1 -1
- package/src/generators/lib-move/generator.js +5 -2
- package/src/generators/lib-move/generator.js.map +1 -1
- package/src/generators/lib-rename/generator.js +5 -1
- package/src/generators/lib-rename/generator.js.map +1 -1
- package/src/generators/lib-tags/generator.js +4 -12
- package/src/generators/lib-tags/generator.js.map +1 -1
- package/src/generators/lib-tags/interfaces/context.d.ts +0 -5
- package/src/generators/lib-tags/utils/check-lib-tags.js +4 -9
- package/src/generators/lib-tags/utils/check-lib-tags.js.map +1 -1
- package/src/shared/templates/config-template.json +29 -41
- package/src/shared/utils/config-utils.d.ts +3 -11
- package/src/shared/utils/config-utils.js +57 -78
- package/src/shared/utils/config-utils.js.map +1 -1
- package/src/generators/code-checks/files/.eslint.ronasit.json.template +0 -183
- package/src/generators/code-checks/files/.eslintrc.json.template +0 -178
- package/src/generators/repo-config/files/.env.template +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
|
|
2
|
+
const stylistic = require('@stylistic/eslint-plugin');
|
|
3
|
+
const unusedImports = require('eslint-plugin-unused-imports');
|
|
4
|
+
const react = require('eslint-plugin-react');
|
|
5
|
+
const reactHooks = require('eslint-plugin-react-hooks');
|
|
6
|
+
const _import = require('eslint-plugin-import');
|
|
7
|
+
const tseslint = require('typescript-eslint');
|
|
8
|
+
|
|
9
|
+
const { fixupPluginRules } = require('@eslint/compat');
|
|
10
|
+
|
|
11
|
+
const globals = require('globals');
|
|
12
|
+
const tsParser = require('@typescript-eslint/parser');
|
|
13
|
+
const eslint = require('@eslint/js');
|
|
14
|
+
|
|
15
|
+
module.exports = [
|
|
16
|
+
eslint.configs.recommended,
|
|
17
|
+
...tseslint.configs.recommended,
|
|
18
|
+
react.configs.flat.recommended,
|
|
19
|
+
react.configs.flat['jsx-runtime'],
|
|
20
|
+
{
|
|
21
|
+
plugins: {
|
|
22
|
+
'@typescript-eslint': typescriptEslint,
|
|
23
|
+
'@stylistic': stylistic,
|
|
24
|
+
'unused-imports': unusedImports,
|
|
25
|
+
react,
|
|
26
|
+
'react-hooks': reactHooks,
|
|
27
|
+
import: _import,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
languageOptions: {
|
|
31
|
+
globals: {
|
|
32
|
+
...globals.node,
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
parser: tsParser,
|
|
36
|
+
ecmaVersion: 6,
|
|
37
|
+
sourceType: 'commonjs',
|
|
38
|
+
|
|
39
|
+
parserOptions: {
|
|
40
|
+
project: 'tsconfig.(base|lib).json',
|
|
41
|
+
|
|
42
|
+
ecmaFeatures: {
|
|
43
|
+
jsx: true,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
settings: {
|
|
49
|
+
react: {
|
|
50
|
+
version: 'detect',
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
'react-native/style-sheet-object-names': ['EStyleSheet'],
|
|
54
|
+
|
|
55
|
+
'import/parsers': {
|
|
56
|
+
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
'import/resolver': {
|
|
60
|
+
typescript: {
|
|
61
|
+
alwaysTryTypes: true,
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
node: {
|
|
65
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
rules: {
|
|
71
|
+
'@stylistic/indent': [
|
|
72
|
+
'warn',
|
|
73
|
+
2,
|
|
74
|
+
{
|
|
75
|
+
SwitchCase: 1,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
|
|
79
|
+
'@stylistic/quotes': [
|
|
80
|
+
'warn',
|
|
81
|
+
'single',
|
|
82
|
+
{
|
|
83
|
+
allowTemplateLiterals: true,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
|
|
87
|
+
'react/react-in-jsx-scope': 'off',
|
|
88
|
+
'@stylistic/arrow-parens': ['warn', 'always'],
|
|
89
|
+
'@stylistic/comma-dangle': ['warn', 'never'],
|
|
90
|
+
'no-var': 'warn',
|
|
91
|
+
'no-dupe-class-members': 'off',
|
|
92
|
+
'import/prefer-default-export': 'off',
|
|
93
|
+
'@stylistic/implicit-arrow-linebreak': ['warn', 'beside'],
|
|
94
|
+
|
|
95
|
+
'@stylistic/newline-per-chained-call': [
|
|
96
|
+
'warn',
|
|
97
|
+
{
|
|
98
|
+
ignoreChainWithDepth: 2,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
|
|
102
|
+
'@stylistic/function-call-argument-newline': ['warn', 'consistent'],
|
|
103
|
+
'@stylistic/function-paren-newline': ['warn', 'consistent'],
|
|
104
|
+
'@stylistic/array-element-newline': ['warn', 'consistent'],
|
|
105
|
+
|
|
106
|
+
'@stylistic/array-bracket-newline': [
|
|
107
|
+
'warn',
|
|
108
|
+
{
|
|
109
|
+
multiline: true,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
|
|
113
|
+
'@stylistic/padding-line-between-statements': [
|
|
114
|
+
'warn',
|
|
115
|
+
{
|
|
116
|
+
blankLine: 'always',
|
|
117
|
+
prev: '*',
|
|
118
|
+
next: 'return',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
blankLine: 'always',
|
|
122
|
+
prev: '*',
|
|
123
|
+
next: 'multiline-block-like',
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
|
|
127
|
+
'@typescript-eslint/no-use-before-define': [
|
|
128
|
+
'warn',
|
|
129
|
+
{
|
|
130
|
+
variables: false,
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
|
|
134
|
+
'@stylistic/lines-between-class-members': [
|
|
135
|
+
'warn',
|
|
136
|
+
'always',
|
|
137
|
+
{
|
|
138
|
+
exceptAfterSingleLine: true,
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
|
|
142
|
+
'@typescript-eslint/no-inferrable-types': [
|
|
143
|
+
'warn',
|
|
144
|
+
{
|
|
145
|
+
ignoreParameters: true,
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
|
|
149
|
+
'@typescript-eslint/explicit-module-boundary-types': [
|
|
150
|
+
'warn',
|
|
151
|
+
{
|
|
152
|
+
allowArgumentsExplicitlyTypedAsAny: true,
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
|
|
156
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
157
|
+
|
|
158
|
+
'@typescript-eslint/explicit-member-accessibility': [
|
|
159
|
+
'warn',
|
|
160
|
+
{
|
|
161
|
+
accessibility: 'explicit',
|
|
162
|
+
|
|
163
|
+
overrides: {
|
|
164
|
+
constructors: 'no-public',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
|
|
169
|
+
'@typescript-eslint/explicit-function-return-type': [
|
|
170
|
+
'warn',
|
|
171
|
+
{
|
|
172
|
+
allowExpressions: true,
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
|
|
176
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
177
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
178
|
+
|
|
179
|
+
'@typescript-eslint/array-type': [
|
|
180
|
+
'warn',
|
|
181
|
+
{
|
|
182
|
+
default: 'generic',
|
|
183
|
+
readonly: 'generic',
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
|
|
187
|
+
'@typescript-eslint/member-ordering': [
|
|
188
|
+
'warn',
|
|
189
|
+
{
|
|
190
|
+
default: [
|
|
191
|
+
'public-static-field',
|
|
192
|
+
'protected-static-field',
|
|
193
|
+
'private-static-field',
|
|
194
|
+
'public-instance-field',
|
|
195
|
+
'protected-instance-field',
|
|
196
|
+
'private-instance-field',
|
|
197
|
+
'public-static-accessor',
|
|
198
|
+
'protected-static-accessor',
|
|
199
|
+
'private-static-accessor',
|
|
200
|
+
'public-instance-accessor',
|
|
201
|
+
'protected-instance-accessor',
|
|
202
|
+
'private-instance-accessor',
|
|
203
|
+
'public-constructor',
|
|
204
|
+
'protected-constructor',
|
|
205
|
+
'private-constructor',
|
|
206
|
+
'public-static-method',
|
|
207
|
+
'public-instance-method',
|
|
208
|
+
'protected-static-method',
|
|
209
|
+
'protected-instance-method',
|
|
210
|
+
'private-static-method',
|
|
211
|
+
'private-instance-method',
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
|
|
216
|
+
'@typescript-eslint/naming-convention': [
|
|
217
|
+
'warn',
|
|
218
|
+
{
|
|
219
|
+
selector: 'typeLike',
|
|
220
|
+
format: ['PascalCase'],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
selector: ['parameter'],
|
|
224
|
+
format: ['camelCase', 'PascalCase'],
|
|
225
|
+
leadingUnderscore: 'allow',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
selector: ['classProperty'],
|
|
229
|
+
format: ['camelCase', 'snake_case'],
|
|
230
|
+
leadingUnderscore: 'allow',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
selector: ['method', 'accessor'],
|
|
234
|
+
format: ['camelCase'],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
selector: ['function', 'typeProperty'],
|
|
238
|
+
format: ['camelCase', 'PascalCase'],
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
selector: 'variable',
|
|
242
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
selector: 'enumMember',
|
|
246
|
+
format: ['UPPER_CASE'],
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
|
|
250
|
+
'unused-imports/no-unused-imports': 'warn',
|
|
251
|
+
|
|
252
|
+
'unused-imports/no-unused-vars': [
|
|
253
|
+
'warn',
|
|
254
|
+
{
|
|
255
|
+
vars: 'all',
|
|
256
|
+
varsIgnorePattern: '^_',
|
|
257
|
+
argsIgnorePattern: '^_',
|
|
258
|
+
ignoreRestSiblings: true,
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
|
|
262
|
+
'@stylistic/jsx-quotes': ['warn', 'prefer-single'],
|
|
263
|
+
'react/jsx-boolean-value': 'off',
|
|
264
|
+
|
|
265
|
+
'@stylistic/jsx-self-closing-comp': [
|
|
266
|
+
'warn',
|
|
267
|
+
{
|
|
268
|
+
component: true,
|
|
269
|
+
html: true,
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
|
|
273
|
+
'@stylistic/jsx-max-props-per-line': [
|
|
274
|
+
1,
|
|
275
|
+
{
|
|
276
|
+
maximum: {
|
|
277
|
+
single: 2,
|
|
278
|
+
multi: 1,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
|
|
283
|
+
'@stylistic/jsx-first-prop-new-line': ['warn', 'multiline'],
|
|
284
|
+
'react/prop-types': 'off',
|
|
285
|
+
'react/jsx-fragments': ['warn', 'element'],
|
|
286
|
+
'import/newline-after-import': 'warn',
|
|
287
|
+
'import/no-unresolved': 'error',
|
|
288
|
+
'import/no-cycle': 'error',
|
|
289
|
+
|
|
290
|
+
'import/order': [
|
|
291
|
+
'warn',
|
|
292
|
+
{
|
|
293
|
+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
|
|
294
|
+
|
|
295
|
+
alphabetize: {
|
|
296
|
+
order: 'asc',
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
|
|
301
|
+
'import/no-duplicates': 'warn',
|
|
302
|
+
'react-hooks/exhaustive-deps': 'off',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
files: ['**/*.js'],
|
|
307
|
+
|
|
308
|
+
rules: {
|
|
309
|
+
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
310
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
files: ['**/*actions.ts'],
|
|
315
|
+
|
|
316
|
+
rules: {
|
|
317
|
+
'@stylistic/function-call-argument-newline': ['warn', 'always'],
|
|
318
|
+
|
|
319
|
+
'@stylistic/function-paren-newline': [
|
|
320
|
+
'warn',
|
|
321
|
+
{
|
|
322
|
+
minItems: 1,
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
files: ['**/*selectors.ts'],
|
|
329
|
+
|
|
330
|
+
rules: {
|
|
331
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
332
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
333
|
+
'@stylistic/function-call-argument-newline': ['warn', 'always'],
|
|
334
|
+
'@stylistic/function-paren-newline': ['warn', 'multiline-arguments'],
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
];
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
const nx = require('@nx/eslint-plugin');
|
|
2
|
+
const js = require('@eslint/js');
|
|
3
|
+
const eslintConfigPrettier = require('eslint-config-prettier');
|
|
4
|
+
|
|
5
|
+
const ronasitConfig = require('./.eslint.ronasit.cjs');
|
|
6
|
+
const constraints = require('./eslint.constraints.json');
|
|
7
|
+
|
|
8
|
+
module.exports = [
|
|
9
|
+
{
|
|
10
|
+
ignores: ['**/node_modules', '**/dist', '**/*.js', '**/*.cjs', '**/*.mjs', 'apps/*/app.config.ts'],
|
|
11
|
+
},
|
|
12
|
+
...ronasitConfig,
|
|
13
|
+
{
|
|
14
|
+
plugins: {
|
|
15
|
+
'@nx': nx,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
20
|
+
rules: {
|
|
21
|
+
'@nx/enforce-module-boundaries': [
|
|
22
|
+
'error',
|
|
23
|
+
{
|
|
24
|
+
enforceBuildableLibDependency: true,
|
|
25
|
+
allow: [],
|
|
26
|
+
depConstraints: constraints,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
33
|
+
|
|
34
|
+
rules: {
|
|
35
|
+
'@stylistic/array-bracket-newline': 'off',
|
|
36
|
+
'@stylistic/array-bracket-spacing': 'off',
|
|
37
|
+
'@stylistic/array-element-newline': 'off',
|
|
38
|
+
'@stylistic/arrow-parens': 'off',
|
|
39
|
+
'@stylistic/arrow-spacing': 'off',
|
|
40
|
+
'@stylistic/block-spacing': 'off',
|
|
41
|
+
'@stylistic/brace-style': 'off',
|
|
42
|
+
'@stylistic/comma-dangle': 'off',
|
|
43
|
+
'@stylistic/comma-spacing': 'off',
|
|
44
|
+
'@stylistic/comma-style': 'off',
|
|
45
|
+
'@stylistic/computed-property-spacing': 'off',
|
|
46
|
+
'@stylistic/dot-location': 'off',
|
|
47
|
+
'@stylistic/eol-last': 'off',
|
|
48
|
+
'@stylistic/func-call-spacing': 'off',
|
|
49
|
+
'@stylistic/function-call-argument-newline': 'off',
|
|
50
|
+
'@stylistic/function-call-spacing': 'off',
|
|
51
|
+
'@stylistic/function-paren-newline': 'off',
|
|
52
|
+
'@stylistic/generator-star-spacing': 'off',
|
|
53
|
+
'@stylistic/implicit-arrow-linebreak': 'off',
|
|
54
|
+
'@stylistic/indent': 'off',
|
|
55
|
+
'@stylistic/jsx-quotes': 'off',
|
|
56
|
+
'@stylistic/key-spacing': 'off',
|
|
57
|
+
'@stylistic/keyword-spacing': 'off',
|
|
58
|
+
'@stylistic/linebreak-style': 'off',
|
|
59
|
+
'@stylistic/max-statements-per-line': 'off',
|
|
60
|
+
'@stylistic/multiline-ternary': 'off',
|
|
61
|
+
'@stylistic/new-parens': 'off',
|
|
62
|
+
'@stylistic/newline-per-chained-call': 'off',
|
|
63
|
+
'@stylistic/no-extra-parens': 'off',
|
|
64
|
+
'@stylistic/no-extra-semi': 'off',
|
|
65
|
+
'@stylistic/no-floating-decimal': 'off',
|
|
66
|
+
'@stylistic/no-mixed-spaces-and-tabs': 'off',
|
|
67
|
+
'@stylistic/no-multi-spaces': 'off',
|
|
68
|
+
'@stylistic/no-multiple-empty-lines': 'off',
|
|
69
|
+
'@stylistic/no-trailing-spaces': 'off',
|
|
70
|
+
'@stylistic/no-whitespace-before-property': 'off',
|
|
71
|
+
'@stylistic/nonblock-statement-body-position': 'off',
|
|
72
|
+
'@stylistic/object-curly-newline': 'off',
|
|
73
|
+
'@stylistic/object-curly-spacing': 'off',
|
|
74
|
+
'@stylistic/object-property-newline': 'off',
|
|
75
|
+
'@stylistic/one-var-declaration-per-line': 'off',
|
|
76
|
+
'@stylistic/operator-linebreak': 'off',
|
|
77
|
+
'@stylistic/padded-blocks': 'off',
|
|
78
|
+
'@stylistic/quote-props': 'off',
|
|
79
|
+
'@stylistic/rest-spread-spacing': 'off',
|
|
80
|
+
'@stylistic/semi': 'off',
|
|
81
|
+
'@stylistic/semi-spacing': 'off',
|
|
82
|
+
'@stylistic/semi-style': 'off',
|
|
83
|
+
'@stylistic/space-before-blocks': 'off',
|
|
84
|
+
'@stylistic/space-before-function-paren': 'off',
|
|
85
|
+
'@stylistic/space-in-parens': 'off',
|
|
86
|
+
'@stylistic/space-infix-ops': 'off',
|
|
87
|
+
'@stylistic/space-unary-ops': 'off',
|
|
88
|
+
'@stylistic/switch-colon-spacing': 'off',
|
|
89
|
+
'@stylistic/template-curly-spacing': 'off',
|
|
90
|
+
'@stylistic/template-tag-spacing': 'off',
|
|
91
|
+
'@stylistic/wrap-iife': 'off',
|
|
92
|
+
'@stylistic/wrap-regex': 'off',
|
|
93
|
+
'@stylistic/yield-star-spacing': 'off',
|
|
94
|
+
'@stylistic/member-delimiter-style': 'off',
|
|
95
|
+
'@stylistic/type-annotation-spacing': 'off',
|
|
96
|
+
'@stylistic/jsx-child-element-spacing': 'off',
|
|
97
|
+
'@stylistic/jsx-closing-bracket-location': 'off',
|
|
98
|
+
'@stylistic/jsx-closing-tag-location': 'off',
|
|
99
|
+
'@stylistic/jsx-curly-newline': 'off',
|
|
100
|
+
'@stylistic/jsx-curly-spacing': 'off',
|
|
101
|
+
'@stylistic/jsx-equals-spacing': 'off',
|
|
102
|
+
'@stylistic/jsx-first-prop-new-line': 'off',
|
|
103
|
+
'@stylistic/jsx-indent': 'off',
|
|
104
|
+
'@stylistic/jsx-indent-props': 'off',
|
|
105
|
+
'@stylistic/jsx-max-props-per-line': 'off',
|
|
106
|
+
'@stylistic/jsx-newline': 'off',
|
|
107
|
+
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
108
|
+
'@stylistic/jsx-props-no-multi-spaces': 'off',
|
|
109
|
+
'@stylistic/jsx-tag-spacing': 'off',
|
|
110
|
+
'@stylistic/jsx-wrap-multilines': 'off',
|
|
111
|
+
'@stylistic/indent-binary-ops': 'off',
|
|
112
|
+
'@stylistic/type-generic-spacing': 'off',
|
|
113
|
+
'@stylistic/type-named-tuple-spacing': 'off',
|
|
114
|
+
'@stylistic/js/array-bracket-newline': 'off',
|
|
115
|
+
'@stylistic/js/array-bracket-spacing': 'off',
|
|
116
|
+
'@stylistic/js/array-element-newline': 'off',
|
|
117
|
+
'@stylistic/js/arrow-parens': 'off',
|
|
118
|
+
'@stylistic/js/arrow-spacing': 'off',
|
|
119
|
+
'@stylistic/js/block-spacing': 'off',
|
|
120
|
+
'@stylistic/js/brace-style': 'off',
|
|
121
|
+
'@stylistic/js/comma-dangle': 'off',
|
|
122
|
+
'@stylistic/js/comma-spacing': 'off',
|
|
123
|
+
'@stylistic/js/comma-style': 'off',
|
|
124
|
+
'@stylistic/js/computed-property-spacing': 'off',
|
|
125
|
+
'@stylistic/js/dot-location': 'off',
|
|
126
|
+
'@stylistic/js/eol-last': 'off',
|
|
127
|
+
'@stylistic/js/func-call-spacing': 'off',
|
|
128
|
+
'@stylistic/js/function-call-argument-newline': 'off',
|
|
129
|
+
'@stylistic/js/function-call-spacing': 'off',
|
|
130
|
+
'@stylistic/js/function-paren-newline': 'off',
|
|
131
|
+
'@stylistic/js/generator-star-spacing': 'off',
|
|
132
|
+
'@stylistic/js/implicit-arrow-linebreak': 'off',
|
|
133
|
+
'@stylistic/js/indent': 'off',
|
|
134
|
+
'@stylistic/js/jsx-quotes': 'off',
|
|
135
|
+
'@stylistic/js/key-spacing': 'off',
|
|
136
|
+
'@stylistic/js/keyword-spacing': 'off',
|
|
137
|
+
'@stylistic/js/linebreak-style': 'off',
|
|
138
|
+
'@stylistic/js/max-statements-per-line': 'off',
|
|
139
|
+
'@stylistic/js/multiline-ternary': 'off',
|
|
140
|
+
'@stylistic/js/new-parens': 'off',
|
|
141
|
+
'@stylistic/js/newline-per-chained-call': 'off',
|
|
142
|
+
'@stylistic/js/no-extra-parens': 'off',
|
|
143
|
+
'@stylistic/js/no-extra-semi': 'off',
|
|
144
|
+
'@stylistic/js/no-floating-decimal': 'off',
|
|
145
|
+
'@stylistic/js/no-mixed-spaces-and-tabs': 'off',
|
|
146
|
+
'@stylistic/js/no-multi-spaces': 'off',
|
|
147
|
+
'@stylistic/js/no-multiple-empty-lines': 'off',
|
|
148
|
+
'@stylistic/js/no-trailing-spaces': 'off',
|
|
149
|
+
'@stylistic/js/no-whitespace-before-property': 'off',
|
|
150
|
+
'@stylistic/js/nonblock-statement-body-position': 'off',
|
|
151
|
+
'@stylistic/js/object-curly-newline': 'off',
|
|
152
|
+
'@stylistic/js/object-curly-spacing': 'off',
|
|
153
|
+
'@stylistic/js/object-property-newline': 'off',
|
|
154
|
+
'@stylistic/js/one-var-declaration-per-line': 'off',
|
|
155
|
+
'@stylistic/js/operator-linebreak': 'off',
|
|
156
|
+
'@stylistic/js/padded-blocks': 'off',
|
|
157
|
+
'@stylistic/js/quote-props': 'off',
|
|
158
|
+
'@stylistic/js/rest-spread-spacing': 'off',
|
|
159
|
+
'@stylistic/js/semi': 'off',
|
|
160
|
+
'@stylistic/js/semi-spacing': 'off',
|
|
161
|
+
'@stylistic/js/semi-style': 'off',
|
|
162
|
+
'@stylistic/js/space-before-blocks': 'off',
|
|
163
|
+
'@stylistic/js/space-before-function-paren': 'off',
|
|
164
|
+
'@stylistic/js/space-in-parens': 'off',
|
|
165
|
+
'@stylistic/js/space-infix-ops': 'off',
|
|
166
|
+
'@stylistic/js/space-unary-ops': 'off',
|
|
167
|
+
'@stylistic/js/switch-colon-spacing': 'off',
|
|
168
|
+
'@stylistic/js/template-curly-spacing': 'off',
|
|
169
|
+
'@stylistic/js/template-tag-spacing': 'off',
|
|
170
|
+
'@stylistic/js/wrap-iife': 'off',
|
|
171
|
+
'@stylistic/js/wrap-regex': 'off',
|
|
172
|
+
'@stylistic/js/yield-star-spacing': 'off',
|
|
173
|
+
'@stylistic/ts/block-spacing': 'off',
|
|
174
|
+
'@stylistic/ts/brace-style': 'off',
|
|
175
|
+
'@stylistic/ts/comma-dangle': 'off',
|
|
176
|
+
'@stylistic/ts/comma-spacing': 'off',
|
|
177
|
+
'@stylistic/ts/func-call-spacing': 'off',
|
|
178
|
+
'@stylistic/ts/function-call-spacing': 'off',
|
|
179
|
+
'@stylistic/ts/indent': 'off',
|
|
180
|
+
'@stylistic/ts/key-spacing': 'off',
|
|
181
|
+
'@stylistic/ts/keyword-spacing': 'off',
|
|
182
|
+
'@stylistic/ts/member-delimiter-style': 'off',
|
|
183
|
+
'@stylistic/ts/no-extra-parens': 'off',
|
|
184
|
+
'@stylistic/ts/no-extra-semi': 'off',
|
|
185
|
+
'@stylistic/ts/object-curly-spacing': 'off',
|
|
186
|
+
'@stylistic/ts/semi': 'off',
|
|
187
|
+
'@stylistic/ts/space-before-blocks': 'off',
|
|
188
|
+
'@stylistic/ts/space-before-function-paren': 'off',
|
|
189
|
+
'@stylistic/ts/space-infix-ops': 'off',
|
|
190
|
+
'@stylistic/ts/type-annotation-spacing': 'off',
|
|
191
|
+
'@stylistic/jsx/jsx-child-element-spacing': 'off',
|
|
192
|
+
'@stylistic/jsx/jsx-closing-bracket-location': 'off',
|
|
193
|
+
'@stylistic/jsx/jsx-closing-tag-location': 'off',
|
|
194
|
+
'@stylistic/jsx/jsx-curly-newline': 'off',
|
|
195
|
+
'@stylistic/jsx/jsx-curly-spacing': 'off',
|
|
196
|
+
'@stylistic/jsx/jsx-equals-spacing': 'off',
|
|
197
|
+
'@stylistic/jsx/jsx-first-prop-new-line': 'off',
|
|
198
|
+
'@stylistic/jsx/jsx-indent': 'off',
|
|
199
|
+
'@stylistic/jsx/jsx-indent-props': 'off',
|
|
200
|
+
'@stylistic/jsx/jsx-max-props-per-line': 'off',
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
eslintConfigPrettier,
|
|
204
|
+
];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"sourceTag": "app:shared",
|
|
4
|
+
"onlyDependOnLibsWithTags": ["app:shared"]
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"sourceTag": "scope:shared",
|
|
8
|
+
"onlyDependOnLibsWithTags": ["scope:*"]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"sourceTag": "type:app",
|
|
12
|
+
"onlyDependOnLibsWithTags": ["type:features", "type:ui", "type:utils", "type:data-access"]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"sourceTag": "type:utils",
|
|
16
|
+
"onlyDependOnLibsWithTags": ["type:utils"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"sourceTag": "type:data-access",
|
|
20
|
+
"onlyDependOnLibsWithTags": ["type:data-access", "type:utils"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"sourceTag": "type:features",
|
|
24
|
+
"onlyDependOnLibsWithTags": ["type:features", "type:data-access", "type:ui", "type:utils"]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"sourceTag": "type:ui",
|
|
28
|
+
"onlyDependOnLibsWithTags": ["type:ui", "type:utils"]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
@@ -9,7 +9,7 @@ const dependencies_1 = require("../../shared/dependencies");
|
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
const scripts_1 = require("./scripts");
|
|
11
11
|
function codeChecksGenerator(tree, options) {
|
|
12
|
-
var _a
|
|
12
|
+
var _a;
|
|
13
13
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
const projectRoot = '.';
|
|
15
15
|
// Delete files
|
|
@@ -29,17 +29,8 @@ function codeChecksGenerator(tree, options) {
|
|
|
29
29
|
// Update .gitignore
|
|
30
30
|
const gitignoreContent = ((_a = tree.read('.gitignore')) === null || _a === void 0 ? void 0 : _a.toString()) + '\n.eslintcache\n';
|
|
31
31
|
tree.write('.gitignore', gitignoreContent);
|
|
32
|
-
// Update .eslintignore
|
|
33
|
-
const eslintignoreContent = ((_b = tree.read('.eslintignore')) === null || _b === void 0 ? void 0 : _b.toString()) + '\n**/*.js\napps/*/app.config.ts\n';
|
|
34
|
-
tree.write('.eslintignore', eslintignoreContent);
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
36
|
-
const configTemplate = require('../../shared/templates/config-template.json');
|
|
37
32
|
// Add files
|
|
38
33
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), projectRoot, options);
|
|
39
|
-
// Add rules to .eslintrc.json
|
|
40
|
-
const esLintConfig = (0, devkit_1.readJson)(tree, '.eslintrc.json');
|
|
41
|
-
esLintConfig.overrides.push(configTemplate);
|
|
42
|
-
(0, devkit_1.writeJson)(tree, '.eslintrc.json', esLintConfig);
|
|
43
34
|
// Install necessary dependencies
|
|
44
35
|
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, dependencies_1.devDependencies['code-checks']);
|
|
45
36
|
yield (0, devkit_1.formatFiles)(tree);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/code-checks/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AACpB,4DAA4D;AAC5D,qCAA8B;AAE9B,uCAAgC;AAEhC,SAAsB,mBAAmB,CAAC,IAAU,EAAE,OAAkC;;;QACtF,MAAM,WAAW,GAAG,GAAG,CAAC;QAExB,eAAe;QACf,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAE3B,4BAA4B;QAC5B,IAAA,wBAAQ,EAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAExD,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACnD,WAAW,CAAC,aAAa,CAAC,GAAG,gBAAM,CAAC,aAAa,CAAC,CAAC;QACnD,WAAW,CAAC,OAAO,mCAAQ,iBAAO,GAAK,WAAW,CAAC,OAAO,CAAE,CAAC;QAC7D,IAAA,kBAAS,EAAC,IAAI,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;QAE7C,4BAA4B;QAC5B,MAAM,YAAY,GAAG,IAAA,iBAAQ,EAAC,IA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,MAAM,YAAY,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAC1D,YAAY,CAAC,eAAe,mCAAQ,gBAAM,CAAC,QAAQ,GAAK,YAAY,CAAC,eAAe,CAAE,CAAC;QACvF,IAAA,kBAAS,EAAC,IAAI,EAAE,oBAAoB,EAAE,YAAY,CAAC,CAAC;QAEpD,oBAAoB;QACpB,MAAM,gBAAgB,GAAG,CAAA,MAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,0CAAE,QAAQ,EAAE,IAAG,kBAAkB,CAAC;QAClF,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;QAE3C,YAAY;QACZ,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QAEzE,iCAAiC;QACjC,IAAA,qCAA4B,EAAC,IAAI,EAAE,EAAE,EAAE,8BAAe,CAAC,aAAa,CAAC,CAAC,CAAC;QAEvE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,GAAS,EAAE;YAChB,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;;CACH;AApCD,kDAoCC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
-
lint: 'npx tsc &&
|
|
4
|
+
lint: 'npx tsc && npx eslint ./',
|
|
5
5
|
format: 'npx prettier --write . && npm run lint -- --fix',
|
|
6
6
|
prepare: 'husky',
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/code-checks/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/code-checks/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE,iDAAiD;IACzD,OAAO,EAAE,OAAO;CACjB,CAAC"}
|
|
@@ -25,8 +25,11 @@ function libMoveGenerator(tree, options) {
|
|
|
25
25
|
const libraryName = options.name ||
|
|
26
26
|
(yield (0, utils_1.askQuestion)('If you want to rename the library, enter its new name. Otherwise just press Enter: ', defaultLibraryName));
|
|
27
27
|
const libDirectoryName = (0, utils_1.getLibDirectoryName)(libraryName, options.scope);
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const newLibImportPath = `${path.normalize(`${options.app}/${options.scope}/${options.type}/${libDirectoryName}`)}`;
|
|
29
|
+
const newLibPath = `libs/${newLibImportPath}`;
|
|
30
|
+
const fullLibraryPath = `${(0, utils_1.getImportPathPrefix)(tree)}/${newLibImportPath}`;
|
|
31
|
+
const fullLibraryName = newLibImportPath.split('/').join('-');
|
|
32
|
+
(0, child_process_1.execSync)(`npx nx g mv --projectName=${srcLibraryName} --newProjectName=${fullLibraryName} --destination=${newLibPath} --importPath=${fullLibraryPath}`, { stdio: 'inherit' });
|
|
30
33
|
return () => {
|
|
31
34
|
(0, child_process_1.execSync)('npx nx g lib-tags --skipRepoCheck', { stdio: 'inherit' });
|
|
32
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/lib-move/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAE7B,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/lib-move/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAE7B,8CAW4B;AAG5B,SAAsB,gBAAgB,CAAC,IAAU,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