eslint-config-angular-strict 2.3.80 → 2.3.82
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/index.js +9 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -49,9 +49,9 @@ export default [
|
|
|
49
49
|
'no-plusplus': 'off',
|
|
50
50
|
'no-restricted-syntax': [
|
|
51
51
|
'error',
|
|
52
|
-
{ selector: 'TSEnumDeclaration', message: 'Enums must live in
|
|
53
|
-
{ selector: 'TSInterfaceDeclaration', message: 'Interfaces must live in *.interface.ts files' },
|
|
54
|
-
{ selector: 'TSTypeAliasDeclaration', message: 'Types must live in
|
|
52
|
+
{ selector: 'TSEnumDeclaration:not(TSModuleBlock > TSEnumDeclaration)', message: 'Enums must live in enums.ts or *.enum.ts files' },
|
|
53
|
+
{ selector: 'TSInterfaceDeclaration:not(TSModuleBlock > TSInterfaceDeclaration)', message: 'Interfaces must live in *.interface.ts files' },
|
|
54
|
+
{ selector: 'TSTypeAliasDeclaration:not(TSModuleBlock > TSTypeAliasDeclaration)', message: 'Types must live in types.ts or *.type.ts files' },
|
|
55
55
|
],
|
|
56
56
|
'no-return-assign': 'off',
|
|
57
57
|
'no-underscore-dangle': ['error', { allowAfterThis: true }],
|
|
@@ -315,29 +315,29 @@ export default [
|
|
|
315
315
|
},
|
|
316
316
|
},
|
|
317
317
|
|
|
318
|
-
//
|
|
318
|
+
// enums.ts / *.enum.ts: only enums allowed
|
|
319
319
|
{
|
|
320
|
-
files: ['
|
|
320
|
+
files: ['**/enums.ts', '**/*.enum.ts'],
|
|
321
321
|
rules: {
|
|
322
322
|
'no-restricted-syntax': [
|
|
323
323
|
'error',
|
|
324
324
|
{
|
|
325
325
|
selector: 'Program > :not(ImportDeclaration, TSEnumDeclaration, ExportNamedDeclaration:has(> TSEnumDeclaration))',
|
|
326
|
-
message: 'Only enums allowed in
|
|
326
|
+
message: 'Only enums allowed in enums.ts / *.enum.ts',
|
|
327
327
|
},
|
|
328
328
|
],
|
|
329
329
|
},
|
|
330
330
|
},
|
|
331
331
|
|
|
332
|
-
//
|
|
332
|
+
// types.ts / *.type.ts: only type aliases allowed
|
|
333
333
|
{
|
|
334
|
-
files: ['
|
|
334
|
+
files: ['**/types.ts', '**/*.type.ts'],
|
|
335
335
|
rules: {
|
|
336
336
|
'no-restricted-syntax': [
|
|
337
337
|
'error',
|
|
338
338
|
{
|
|
339
339
|
selector: 'Program > :not(ImportDeclaration, TSTypeAliasDeclaration, ExportNamedDeclaration:has(> TSTypeAliasDeclaration))',
|
|
340
|
-
message: 'Only type aliases allowed in
|
|
340
|
+
message: 'Only type aliases allowed in types.ts / *.type.ts',
|
|
341
341
|
},
|
|
342
342
|
],
|
|
343
343
|
},
|