lucy-cli 0.8.1 → 0.8.3
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/dist/gulp/backend.js +2 -0
- package/dist/gulp/pages.js +1 -0
- package/dist/gulp/public.js +1 -0
- package/dist/index.js +9 -0
- package/dist/settings.json +31 -25
- package/files/eslint.config.mjs +141 -0
- package/files/typedoc.json +27 -17
- package/lucy.jpg +0 -0
- package/package.json +1 -1
- package/src/gulp/backend.ts +2 -0
- package/src/gulp/pages.ts +1 -0
- package/src/gulp/public.ts +1 -0
- package/src/index.ts +10 -0
- package/src/settings.json +31 -25
- package/files/.eslintrc.cjs +0 -99
package/dist/gulp/backend.js
CHANGED
@@ -13,6 +13,7 @@ export function buildBackend(options) {
|
|
13
13
|
const { outputDir, enableIncrementalBuild } = options;
|
14
14
|
const gulpEsbuild = createGulpEsbuild({
|
15
15
|
incremental: enableIncrementalBuild,
|
16
|
+
pipe: true,
|
16
17
|
});
|
17
18
|
// Create tasks for each folder
|
18
19
|
const tasks = folders.map((folder) => {
|
@@ -51,6 +52,7 @@ export function buildBackendJSW(options) {
|
|
51
52
|
const { outputDir, enableIncrementalBuild } = options;
|
52
53
|
const gulpEsbuild = createGulpEsbuild({
|
53
54
|
incremental: enableIncrementalBuild,
|
55
|
+
pipe: true,
|
54
56
|
});
|
55
57
|
// Create tasks for each folder
|
56
58
|
const tasks = folders.map((folder) => {
|
package/dist/gulp/pages.js
CHANGED
@@ -6,6 +6,7 @@ export function buildPages(options) {
|
|
6
6
|
const { outputDir, enableIncrementalBuild } = options;
|
7
7
|
const gulpEsbuild = createGulpEsbuild({
|
8
8
|
incremental: enableIncrementalBuild, // enables the esbuild's incremental build
|
9
|
+
pipe: true, // enables the esbuild's pipe mode
|
9
10
|
});
|
10
11
|
return () => {
|
11
12
|
return gulp.src('typescript/pages/*.ts')
|
package/dist/gulp/public.js
CHANGED
@@ -12,6 +12,7 @@ export function buildPublic(options) {
|
|
12
12
|
const { outputDir, enableIncrementalBuild } = options;
|
13
13
|
const gulpEsbuild = createGulpEsbuild({
|
14
14
|
incremental: enableIncrementalBuild,
|
15
|
+
pipe: true,
|
15
16
|
});
|
16
17
|
// Create tasks for each folder
|
17
18
|
const tasks = folders.map((folder) => {
|
package/dist/index.js
CHANGED
@@ -11,6 +11,7 @@ import { init } from './init.js';
|
|
11
11
|
import { sync } from './sync.js';
|
12
12
|
import { runGulp, installPackages, handleExit } from './helpers.js';
|
13
13
|
import { prepare } from './prepare.js';
|
14
|
+
import { spawnSync } from 'child_process';
|
14
15
|
export const orange = chalk.hex('#FFA500');
|
15
16
|
export const blue = chalk.blueBright;
|
16
17
|
export const green = chalk.greenBright;
|
@@ -59,6 +60,7 @@ async function main() {
|
|
59
60
|
console.log("🦮 " + magenta.bold('sync') + " : Synchronizes the database (not Implemented)");
|
60
61
|
console.log("🦮 " + magenta.bold('install') + " : Installs all Wix npm packages listed in the 'lucy.json' file in the project directory.");
|
61
62
|
console.log("🦮 " + magenta.bold('fix') + " : Runs a fix command to resolve common issues in development or production settings.");
|
63
|
+
console.log("🦮 " + magenta.bold('docs') + " : Generates documentation for the project.");
|
62
64
|
console.log("\nOptions:");
|
63
65
|
console.log("🦮 " + magenta.bold('-h, help') + " : Displays this help message.");
|
64
66
|
console.log("🦮 " + magenta.bold('-v, version') + " : Displays the current version of Lucy CLI as defined in the project’s package.json.");
|
@@ -131,6 +133,13 @@ async function main() {
|
|
131
133
|
init(moduleSettings, projectSettings);
|
132
134
|
return;
|
133
135
|
}
|
136
|
+
if (moduleSettings.args.includes('docs')) {
|
137
|
+
const res = spawnSync('yarn docs', { shell: true, stdio: 'inherit' });
|
138
|
+
if (res.error) {
|
139
|
+
return console.log((`💩 ${red.underline.bold("=> Failed to install dev packages =>")} ${orange(res.error.message)}`));
|
140
|
+
}
|
141
|
+
return console.log("🐕" + blue.underline(` => Docs generated!`));
|
142
|
+
}
|
134
143
|
if (moduleSettings.args.includes('prepare')) {
|
135
144
|
await prepare(moduleSettings, projectSettings);
|
136
145
|
return;
|
package/dist/settings.json
CHANGED
@@ -12,33 +12,39 @@
|
|
12
12
|
"initialized": false,
|
13
13
|
"wixPackages": {},
|
14
14
|
"devPackages": {
|
15
|
-
"@
|
15
|
+
"@eslint/js": "^9.15.0",
|
16
16
|
"@styled/typescript-styled-plugin": "^1.0.1",
|
17
|
-
"@total-typescript/ts-reset": "0.6.1",
|
18
|
-
"@types/jest": "^29.5.
|
19
|
-
"@types/node": "22.9.
|
20
|
-
"@types/
|
21
|
-
"@
|
22
|
-
"@typescript-eslint/
|
23
|
-
"@
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
17
|
+
"@total-typescript/ts-reset": "^0.6.1",
|
18
|
+
"@types/jest": "^29.5.14",
|
19
|
+
"@types/node": "^22.9.1",
|
20
|
+
"@types/nodemailer": "^6.4.17",
|
21
|
+
"@types/react": "^18.3.12",
|
22
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
23
|
+
"@typescript-eslint/parser": "^8.15.0",
|
24
|
+
"@typescript-eslint/utils": "^8.15.0",
|
25
|
+
"@wix/cli": "^1.1.52",
|
26
|
+
"@wix/eslint-plugin-cli": "^1.0.2",
|
27
|
+
"cypress": "^13.16.0",
|
28
|
+
"cypress-cloud": "^1.11.0",
|
29
|
+
"esbuild": "^0.24.0",
|
30
|
+
"eslint": "^9.15.0",
|
31
|
+
"eslint-plugin-import": "^2.31.0",
|
32
|
+
"eslint-plugin-jsdoc": "^50.5.0",
|
30
33
|
"eslint-plugin-named-import-spacing": "^1.0.3",
|
31
|
-
"eslint-plugin-
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"sass": "^1.
|
36
|
-
"ts-jest": "^29.
|
37
|
-
"ts-node": "^10.9.
|
38
|
-
"tsx": "4.19.2",
|
39
|
-
"typedoc": "0.26.11",
|
40
|
-
"typedoc-
|
41
|
-
"
|
34
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
35
|
+
"jest": "^29.7.0",
|
36
|
+
"prettier": "^3.3.3",
|
37
|
+
"react": "^18.3.1",
|
38
|
+
"sass": "^1.81.0",
|
39
|
+
"ts-jest": "^29.2.5",
|
40
|
+
"ts-node": "^10.9.2",
|
41
|
+
"tsx": "^4.19.2",
|
42
|
+
"typedoc": "^0.26.11",
|
43
|
+
"typedoc-plugin-merge-modules": "^6.0.3",
|
44
|
+
"typedoc-plugin-zod": "^1.3.0",
|
45
|
+
"typedoc-theme-hierarchy": "^5.0.3",
|
46
|
+
"typescript": "5.6.3",
|
47
|
+
"typescript-eslint": "^8.15.0",
|
42
48
|
"typescript-eslint-language-service": "^5.0.5"
|
43
49
|
},
|
44
50
|
"scripts": {
|
@@ -0,0 +1,141 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
2
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
3
|
+
import eslint from '@eslint/js';
|
4
|
+
import importPlugin from 'eslint-plugin-import';
|
5
|
+
import jsdoc from 'eslint-plugin-jsdoc';
|
6
|
+
import namedImportSpacing from 'eslint-plugin-named-import-spacing';
|
7
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
8
|
+
import globals from 'globals';
|
9
|
+
import tseslint from 'typescript-eslint';
|
10
|
+
|
11
|
+
export default tseslint.config(
|
12
|
+
|
13
|
+
eslint.configs.recommended,
|
14
|
+
tseslint.configs.recommendedTypeChecked,
|
15
|
+
jsdoc.configs['flat/recommended-typescript'],
|
16
|
+
{
|
17
|
+
ignores: ['./.wix', './src'],
|
18
|
+
plugins: {
|
19
|
+
'@typescript-eslint': tseslint.plugin,
|
20
|
+
'simple-import-sort': simpleImportSort,
|
21
|
+
import: importPlugin,
|
22
|
+
'named-import-spacing': namedImportSpacing,
|
23
|
+
jsdoc,
|
24
|
+
},
|
25
|
+
languageOptions: {
|
26
|
+
parser: tseslint.parser,
|
27
|
+
parserOptions: {
|
28
|
+
projectService: true,
|
29
|
+
},
|
30
|
+
ecmaVersion: 2020,
|
31
|
+
sourceType: 'module',
|
32
|
+
globals: {
|
33
|
+
$w: 'readonly',
|
34
|
+
...globals.browser,
|
35
|
+
...globals.node,
|
36
|
+
// ...globals.es6,
|
37
|
+
},
|
38
|
+
},
|
39
|
+
rules: {
|
40
|
+
'no-restricted-syntax': [
|
41
|
+
'error',
|
42
|
+
{
|
43
|
+
selector: 'StaticBlock',
|
44
|
+
message: 'Static blocks are not allowed in classes.',
|
45
|
+
},
|
46
|
+
],
|
47
|
+
'@typescript-eslint/no-unsafe-argument': 'error',
|
48
|
+
'@typescript-eslint/no-unsafe-assignment': 'error',
|
49
|
+
'@typescript-eslint/no-unsafe-call': 'error',
|
50
|
+
'@typescript-eslint/no-unsafe-member-access': 'error',
|
51
|
+
'@typescript-eslint/no-unsafe-return': 'error',
|
52
|
+
quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
|
53
|
+
curly: ['error', 'multi-line'],
|
54
|
+
'simple-import-sort/imports': 'error',
|
55
|
+
'simple-import-sort/exports': 'error',
|
56
|
+
indent: ['error', 'tab'],
|
57
|
+
'no-tabs': 0,
|
58
|
+
'semi-style': ['error', 'last'],
|
59
|
+
semi: [2, 'always'],
|
60
|
+
'object-curly-spacing': ['error', 'always'],
|
61
|
+
'space-in-parens': ['error', 'never'],
|
62
|
+
'newline-before-return': 'error',
|
63
|
+
'space-before-blocks': ['error', { functions: 'always', keywords: 'never', classes: 'always' }],
|
64
|
+
'comma-spacing': ['error', { before: false, after: true }],
|
65
|
+
'no-multi-spaces': 'error',
|
66
|
+
'import/newline-after-import': ['error', { count: 1 }],
|
67
|
+
'named-import-spacing/named-import-spacing': 2,
|
68
|
+
'no-unused-vars': 'warn',
|
69
|
+
'import/no-unresolved': [0],
|
70
|
+
'no-forbidden-relative-imports': [0],
|
71
|
+
'@typescript-eslint/triple-slash-reference': 'off',
|
72
|
+
'@typescript-eslint/member-ordering': [
|
73
|
+
'error',
|
74
|
+
{
|
75
|
+
classes: [
|
76
|
+
'constructor',
|
77
|
+
'private-instance-field',
|
78
|
+
'protected-instance-field',
|
79
|
+
'public-instance-field',
|
80
|
+
'public-instance-method',
|
81
|
+
'private-instance-method',
|
82
|
+
],
|
83
|
+
},
|
84
|
+
],
|
85
|
+
'@typescript-eslint/naming-convention': [
|
86
|
+
'error',
|
87
|
+
{
|
88
|
+
selector: ['variable', 'function'],
|
89
|
+
format: ['camelCase'],
|
90
|
+
leadingUnderscore: 'allow',
|
91
|
+
},
|
92
|
+
{
|
93
|
+
selector: ['objectLiteralProperty'],
|
94
|
+
format: null,
|
95
|
+
leadingUnderscore: 'allow',
|
96
|
+
},
|
97
|
+
{
|
98
|
+
selector: 'memberLike',
|
99
|
+
modifiers: ['private'],
|
100
|
+
format: ['camelCase'],
|
101
|
+
leadingUnderscore: 'require',
|
102
|
+
},
|
103
|
+
{
|
104
|
+
selector: 'memberLike',
|
105
|
+
modifiers: ['protected'],
|
106
|
+
format: ['camelCase'],
|
107
|
+
leadingUnderscore: 'require',
|
108
|
+
},
|
109
|
+
{
|
110
|
+
selector: 'memberLike',
|
111
|
+
modifiers: ['public'],
|
112
|
+
format: ['camelCase'],
|
113
|
+
leadingUnderscore: 'forbid',
|
114
|
+
},
|
115
|
+
{
|
116
|
+
selector: ['parameterProperty', 'parameter'],
|
117
|
+
format: ['camelCase'],
|
118
|
+
leadingUnderscore: 'forbid',
|
119
|
+
},
|
120
|
+
{
|
121
|
+
selector: 'default',
|
122
|
+
format: ['UPPER_CASE'],
|
123
|
+
leadingUnderscore: 'forbid',
|
124
|
+
trailingUnderscore: 'forbid',
|
125
|
+
custom: {
|
126
|
+
regex: '^[A-Z_]+$',
|
127
|
+
match: true,
|
128
|
+
},
|
129
|
+
},
|
130
|
+
{
|
131
|
+
selector: 'typeLike',
|
132
|
+
format: ['PascalCase'],
|
133
|
+
},
|
134
|
+
{
|
135
|
+
selector: 'function',
|
136
|
+
format: ['UPPER_CASE'],
|
137
|
+
},
|
138
|
+
],
|
139
|
+
},
|
140
|
+
},
|
141
|
+
);
|
package/files/typedoc.json
CHANGED
@@ -1,19 +1,29 @@
|
|
1
|
+
/** @type { import('typedoc').TypeDocOptionMap & import('typedoc-plugin-merge-modules').Config } */
|
1
2
|
{
|
2
|
-
|
3
|
-
"
|
4
|
-
"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
"
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
"
|
3
|
+
"entryPoints": [
|
4
|
+
"*/**/*.ts",
|
5
|
+
"*/**/*.tsx"
|
6
|
+
],
|
7
|
+
"entryPointStrategy": "expand",
|
8
|
+
"out": "docs",
|
9
|
+
"plugin": [
|
10
|
+
"typedoc-theme-hierarchy",
|
11
|
+
"typedoc-plugin-zod",
|
12
|
+
"typedoc-plugin-merge-modules"
|
13
|
+
],
|
14
|
+
"theme": "hierarchy",
|
15
|
+
"tsconfig": "docs.tsconfig.json",
|
16
|
+
"excludeExternals": true,
|
17
|
+
"externalPattern": [
|
18
|
+
"**/node_modules/**",
|
19
|
+
"**/.wix/**",
|
20
|
+
".wix/**"
|
21
|
+
],
|
22
|
+
"exclude": [
|
23
|
+
"./.wix/**/*",
|
24
|
+
".wix/**/*"
|
25
|
+
],
|
26
|
+
"name": "Wix-lucy",
|
27
|
+
"mergeModulesRenameDefaults": true,
|
28
|
+
"mergeModulesMergeMode": "project",
|
19
29
|
}
|
package/lucy.jpg
CHANGED
Binary file
|
package/package.json
CHANGED
package/src/gulp/backend.ts
CHANGED
@@ -16,6 +16,7 @@ export function buildBackend(options: TaskOptions) {
|
|
16
16
|
const { outputDir, enableIncrementalBuild } = options;
|
17
17
|
const gulpEsbuild = createGulpEsbuild({
|
18
18
|
incremental: enableIncrementalBuild,
|
19
|
+
pipe: true,
|
19
20
|
});
|
20
21
|
|
21
22
|
// Create tasks for each folder
|
@@ -64,6 +65,7 @@ export function buildBackendJSW(options: TaskOptions) {
|
|
64
65
|
const { outputDir, enableIncrementalBuild } = options;
|
65
66
|
const gulpEsbuild = createGulpEsbuild({
|
66
67
|
incremental: enableIncrementalBuild,
|
68
|
+
pipe: true,
|
67
69
|
});
|
68
70
|
|
69
71
|
// Create tasks for each folder
|
package/src/gulp/pages.ts
CHANGED
@@ -8,6 +8,7 @@ export function buildPages(options: TaskOptions) {
|
|
8
8
|
const { outputDir, enableIncrementalBuild} = options;
|
9
9
|
const gulpEsbuild = createGulpEsbuild({
|
10
10
|
incremental: enableIncrementalBuild, // enables the esbuild's incremental build
|
11
|
+
pipe: true, // enables the esbuild's pipe mode
|
11
12
|
});
|
12
13
|
|
13
14
|
return () => {
|
package/src/gulp/public.ts
CHANGED
package/src/index.ts
CHANGED
@@ -13,6 +13,7 @@ import { init } from './init.js';
|
|
13
13
|
import { sync } from './sync.js';
|
14
14
|
import { runGulp, installPackages, handleExit } from './helpers.js';
|
15
15
|
import { prepare } from './prepare.js';
|
16
|
+
import { spawnSync } from 'child_process';
|
16
17
|
|
17
18
|
export type LucySettings = {
|
18
19
|
modules: {
|
@@ -113,6 +114,7 @@ async function main(): Promise<void> {
|
|
113
114
|
console.log("🦮 " + magenta.bold('sync') + " : Synchronizes the database (not Implemented)");
|
114
115
|
console.log("🦮 " + magenta.bold('install') + " : Installs all Wix npm packages listed in the 'lucy.json' file in the project directory.");
|
115
116
|
console.log("🦮 " + magenta.bold('fix') + " : Runs a fix command to resolve common issues in development or production settings.");
|
117
|
+
console.log("🦮 " + magenta.bold('docs') + " : Generates documentation for the project.");
|
116
118
|
console.log("\nOptions:");
|
117
119
|
console.log("🦮 " + magenta.bold('-h, help') + " : Displays this help message.");
|
118
120
|
console.log("🦮 " + magenta.bold('-v, version') + " : Displays the current version of Lucy CLI as defined in the project’s package.json.");
|
@@ -189,6 +191,14 @@ async function main(): Promise<void> {
|
|
189
191
|
}
|
190
192
|
|
191
193
|
|
194
|
+
if(moduleSettings.args.includes('docs')){
|
195
|
+
const res = spawnSync('yarn docs', { shell: true, stdio: 'inherit' });
|
196
|
+
if (res.error) {
|
197
|
+
return console.log((`💩 ${red.underline.bold("=> Failed to install dev packages =>")} ${orange(res.error.message)}`));
|
198
|
+
}
|
199
|
+
return console.log("🐕" + blue.underline(` => Docs generated!`));
|
200
|
+
}
|
201
|
+
|
192
202
|
if(moduleSettings.args.includes('prepare')){
|
193
203
|
await prepare( moduleSettings, projectSettings);
|
194
204
|
|
package/src/settings.json
CHANGED
@@ -12,33 +12,39 @@
|
|
12
12
|
"initialized": false,
|
13
13
|
"wixPackages": {},
|
14
14
|
"devPackages": {
|
15
|
-
"@
|
15
|
+
"@eslint/js": "^9.15.0",
|
16
16
|
"@styled/typescript-styled-plugin": "^1.0.1",
|
17
|
-
"@total-typescript/ts-reset": "0.6.1",
|
18
|
-
"@types/jest": "^29.5.
|
19
|
-
"@types/node": "22.9.
|
20
|
-
"@types/
|
21
|
-
"@
|
22
|
-
"@typescript-eslint/
|
23
|
-
"@
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
17
|
+
"@total-typescript/ts-reset": "^0.6.1",
|
18
|
+
"@types/jest": "^29.5.14",
|
19
|
+
"@types/node": "^22.9.1",
|
20
|
+
"@types/nodemailer": "^6.4.17",
|
21
|
+
"@types/react": "^18.3.12",
|
22
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
23
|
+
"@typescript-eslint/parser": "^8.15.0",
|
24
|
+
"@typescript-eslint/utils": "^8.15.0",
|
25
|
+
"@wix/cli": "^1.1.52",
|
26
|
+
"@wix/eslint-plugin-cli": "^1.0.2",
|
27
|
+
"cypress": "^13.16.0",
|
28
|
+
"cypress-cloud": "^1.11.0",
|
29
|
+
"esbuild": "^0.24.0",
|
30
|
+
"eslint": "^9.15.0",
|
31
|
+
"eslint-plugin-import": "^2.31.0",
|
32
|
+
"eslint-plugin-jsdoc": "^50.5.0",
|
30
33
|
"eslint-plugin-named-import-spacing": "^1.0.3",
|
31
|
-
"eslint-plugin-
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"sass": "^1.
|
36
|
-
"ts-jest": "^29.
|
37
|
-
"ts-node": "^10.9.
|
38
|
-
"tsx": "4.19.2",
|
39
|
-
"typedoc": "0.26.11",
|
40
|
-
"typedoc-
|
41
|
-
"
|
34
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
35
|
+
"jest": "^29.7.0",
|
36
|
+
"prettier": "^3.3.3",
|
37
|
+
"react": "^18.3.1",
|
38
|
+
"sass": "^1.81.0",
|
39
|
+
"ts-jest": "^29.2.5",
|
40
|
+
"ts-node": "^10.9.2",
|
41
|
+
"tsx": "^4.19.2",
|
42
|
+
"typedoc": "^0.26.11",
|
43
|
+
"typedoc-plugin-merge-modules": "^6.0.3",
|
44
|
+
"typedoc-plugin-zod": "^1.3.0",
|
45
|
+
"typedoc-theme-hierarchy": "^5.0.3",
|
46
|
+
"typescript": "5.6.3",
|
47
|
+
"typescript-eslint": "^8.15.0",
|
42
48
|
"typescript-eslint-language-service": "^5.0.5"
|
43
49
|
},
|
44
50
|
"scripts": {
|
package/files/.eslintrc.cjs
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
extends: ['eslint:recommended', 'plugin:import/recommended', 'plugin:jsdoc/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@wix/cli/recommended'],
|
3
|
-
plugins: ['simple-import-sort', 'eslint-plugin-named-import-spacing', '@typescript-eslint'],
|
4
|
-
parser: '@typescript-eslint/parser',
|
5
|
-
parserOptions: {
|
6
|
-
ecmaVersion: 2021,
|
7
|
-
},
|
8
|
-
ignorePatterns: ['src/**/*', 'typescript/types/backend/**/*', 'typescript/types/pages/**/*', 'typescript/types/public/**/*', 'typescript/types/node/**/*', '.wix/**/*', 'coverage/**/*', 'docs/**/*'],
|
9
|
-
rules: {
|
10
|
-
quotes: [2, 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
|
11
|
-
curly: ['error', 'multi-line'],
|
12
|
-
'simple-import-sort/imports': 'error',
|
13
|
-
'simple-import-sort/exports': 'error',
|
14
|
-
indent: ['error', 'tab'],
|
15
|
-
'no-tabs': 0,
|
16
|
-
'semi-style': ['error', 'last'],
|
17
|
-
semi: [2, 'always'],
|
18
|
-
'object-curly-spacing': ['error', 'always'],
|
19
|
-
'space-in-parens': ['error', 'never'],
|
20
|
-
'newline-before-return': 'error',
|
21
|
-
'space-before-blocks': ['error', { functions: 'always', keywords: 'never', classes: 'always' }],
|
22
|
-
'comma-spacing': ['error', { before: false, after: true }],
|
23
|
-
'no-multi-spaces': ['error'],
|
24
|
-
'import/newline-after-import': ['error', { count: 1 }],
|
25
|
-
'named-import-spacing/named-import-spacing': 2,
|
26
|
-
'no-unused-vars': 'warn',
|
27
|
-
'import/no-unresolved': [0],
|
28
|
-
'no-forbidden-relative-imports': [0],
|
29
|
-
'@typescript-eslint/triple-slash-reference': 'off',
|
30
|
-
'@typescript-eslint/member-ordering': [
|
31
|
-
'error',
|
32
|
-
{ classes: ['constructor', 'private-instance-field', 'protected-instance-field', 'public-instance-field', 'public-instance-method', 'private-instance-method'] }
|
33
|
-
],
|
34
|
-
'@typescript-eslint/naming-convention': [
|
35
|
-
'error',
|
36
|
-
{
|
37
|
-
selector: ['variable', 'function'],
|
38
|
-
format: ['camelCase'],
|
39
|
-
leadingUnderscore: 'allow'
|
40
|
-
},
|
41
|
-
{
|
42
|
-
selector: ['objectLiteralProperty'],
|
43
|
-
format: null,
|
44
|
-
leadingUnderscore: 'allow'
|
45
|
-
},
|
46
|
-
{
|
47
|
-
selector: 'memberLike',
|
48
|
-
modifiers: ['private'],
|
49
|
-
format: ['camelCase'],
|
50
|
-
leadingUnderscore: 'require'
|
51
|
-
},
|
52
|
-
{
|
53
|
-
selector: 'memberLike',
|
54
|
-
modifiers: ['protected'],
|
55
|
-
format: ['camelCase'],
|
56
|
-
leadingUnderscore: 'require'
|
57
|
-
},
|
58
|
-
{
|
59
|
-
selector: 'memberLike',
|
60
|
-
modifiers: ['public'],
|
61
|
-
format: ['camelCase'],
|
62
|
-
leadingUnderscore: 'forbid'
|
63
|
-
},
|
64
|
-
{
|
65
|
-
selector: ['parameterProperty', 'parameter'],
|
66
|
-
format: ['camelCase'],
|
67
|
-
leadingUnderscore: 'forbid'
|
68
|
-
},
|
69
|
-
{
|
70
|
-
selector: 'default',
|
71
|
-
format: ['UPPER_CASE'],
|
72
|
-
leadingUnderscore: 'forbid',
|
73
|
-
trailingUnderscore: 'forbid',
|
74
|
-
custom: {
|
75
|
-
regex: '^[A-Z_]+$',
|
76
|
-
match: true
|
77
|
-
}
|
78
|
-
},
|
79
|
-
{
|
80
|
-
selector: 'typeLike',
|
81
|
-
format: ['PascalCase']
|
82
|
-
},
|
83
|
-
// Custom rule added
|
84
|
-
{
|
85
|
-
selector: 'function',
|
86
|
-
format: ['UPPER_CASE']
|
87
|
-
}
|
88
|
-
],
|
89
|
-
},
|
90
|
-
root: true,
|
91
|
-
env: {
|
92
|
-
es6: true,
|
93
|
-
browser: true,
|
94
|
-
node: true
|
95
|
-
},
|
96
|
-
globals: {
|
97
|
-
$w: 'readonly'
|
98
|
-
}
|
99
|
-
};
|