@cherepanov.pavel/shareable-config 1.0.2 → 1.0.4

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.
Files changed (49) hide show
  1. package/.editorconfig +2 -3
  2. package/.editorconfig-get.js +3 -3
  3. package/.get-all.js +16 -12
  4. package/.gitattributes-get.js +3 -3
  5. package/.gitignore-get.js +33 -30
  6. package/.vscode/.code-snippets-get.js +34 -31
  7. package/.vscode/extensions.json +17 -17
  8. package/.vscode/extensions.json-get.js +25 -25
  9. package/.vscode/settings.json +36 -27
  10. package/.vscode/settings.json-get.js +25 -25
  11. package/README.md +13 -3
  12. package/env.json5.set.js +1 -1
  13. package/jsconfig.json +4 -7
  14. package/package.json +11 -1
  15. package/tools/eslint-config/configs/global.js +21 -18
  16. package/tools/eslint-config/configs/javascript.js +14 -14
  17. package/tools/eslint-config/configs/json.js +93 -0
  18. package/tools/eslint-config/configs/typescript.js +17 -17
  19. package/tools/eslint-config/configs/vue.js +22 -22
  20. package/tools/eslint-config/index.js +1 -0
  21. package/tools/eslint-config/rules/constants.js +10 -9
  22. package/tools/eslint-config/rules/javascript/index.js +2 -2
  23. package/tools/eslint-config/rules/javascript/possible-problems.js +76 -58
  24. package/tools/eslint-config/rules/javascript/suggestions.js +405 -249
  25. package/tools/eslint-config/rules/stylistic/jsFormatting.js +321 -167
  26. package/tools/eslint-config/rules/stylistic/tsFormatting.js +4 -4
  27. package/tools/eslint-config/rules/typescript/common.js +135 -126
  28. package/tools/eslint-config/rules/typescript/compatibility.js +20 -20
  29. package/tools/eslint-config/rules/typescript/extension.js +44 -44
  30. package/tools/eslint-config/rules/typescript/index.js +3 -3
  31. package/tools/eslint-config/rules/vue/base.js +2 -2
  32. package/tools/eslint-config/rules/vue/extension.js +47 -44
  33. package/tools/eslint-config/rules/vue/formatting.js +66 -36
  34. package/tools/eslint-config/rules/vue/index.js +5 -5
  35. package/tools/eslint-config/rules/vue/possibleProblems.js +182 -109
  36. package/tools/eslint-config/rules/vue/suggestions.js +82 -79
  37. package/tools/stylelint-config/config.js +18 -20
  38. package/tools/stylelint-config/rules/base.js +30 -24
  39. package/tools/stylelint-config/rules/conflicts.js +5 -5
  40. package/tools/stylelint-config/rules/order.js +38 -38
  41. package/tools/stylelint-config/rules/property-groups.js +392 -389
  42. package/tools/stylelint-config/rules/scss.js +9 -6
  43. package/tools/stylelint-config/rules/stylistic.js +110 -109
  44. package/utils/communication.js +26 -26
  45. package/utils/copy-with-override.js +35 -33
  46. package/utils/env.js +4 -4
  47. package/utils/file-header.js +9 -9
  48. package/utils/file.js +46 -46
  49. package/utils/merge.js +161 -155
package/.editorconfig CHANGED
@@ -6,6 +6,5 @@ indent_size = tab
6
6
  tab_width = 2
7
7
  end_of_line = lf
8
8
  charset = utf-8
9
- # set later
10
- # trim_trailing_whitespace = true
11
- # insert_final_newline = false
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
@@ -13,7 +13,7 @@ const src = path.join(dirname, fileName);
13
13
  const srcFileData = await readFile(src, 'utf8');
14
14
 
15
15
  copyWithOverride({
16
- destFile,
17
- srcFileData,
18
- fileLabel: fileName,
16
+ destFile,
17
+ srcFileData,
18
+ fileLabel: fileName,
19
19
  });
package/.get-all.js CHANGED
@@ -4,12 +4,12 @@ import { spawnSync } from 'child_process';
4
4
  import { readFile } from 'fs/promises';
5
5
 
6
6
  const commands = [
7
- 'get-editorconfig',
8
- 'get-gitattributes',
9
- 'get-gitignore',
10
- 'get-extensions',
11
- 'get-settings',
12
- 'get-code-snippets',
7
+ 'get-editorconfig',
8
+ 'get-gitattributes',
9
+ 'get-gitignore',
10
+ 'get-extensions',
11
+ 'get-settings',
12
+ 'get-code-snippets',
13
13
  ];
14
14
 
15
15
  let hasError = false;
@@ -17,13 +17,17 @@ let hasError = false;
17
17
  const pkg = JSON.parse(await readFile(new URL('./package.json', import.meta.url), 'utf8'));
18
18
 
19
19
  commands.forEach((cmd) => {
20
- const result = spawnSync('npx', ['-p', pkg.name, cmd], { stdio: 'inherit' });
21
- if (result.status !== 0) {
22
- console.error(`\nОшибка при выполнении команды: ${cmd}`);
23
- hasError = true;
24
- }
20
+ const result = spawnSync('npx', [
21
+ '-p',
22
+ pkg.name,
23
+ cmd,
24
+ ], { stdio: 'inherit' });
25
+ if (result.status !== 0) {
26
+ console.error(`\nОшибка при выполнении команды: ${cmd}`);
27
+ hasError = true;
28
+ }
25
29
  });
26
30
 
27
31
  if (hasError) {
28
- process.exit(1);
32
+ process.exit(1);
29
33
  }
@@ -13,7 +13,7 @@ const src = path.join(dirname, fileName);
13
13
  const srcFileData = await readFile(src, 'utf8');
14
14
 
15
15
  copyWithOverride({
16
- destFile,
17
- srcFileData,
18
- fileLabel: fileName,
16
+ destFile,
17
+ srcFileData,
18
+ fileLabel: fileName,
19
19
  });
package/.gitignore-get.js CHANGED
@@ -10,38 +10,41 @@ const fileName = '.gitignore';
10
10
  const destFile = path.join(process.cwd(), fileName);
11
11
 
12
12
  async function getGitignoreFileData(framework) {
13
- const dirname = path.dirname(fileURLToPath(import.meta.url));
14
- const src = path.join(dirname, '.npmignore');
15
- const srcFileData = await readFile(src, 'utf8');
16
-
17
- const [commonData] = srcFileData.split(/^#\s*\w+/mu);
18
-
19
- if (!framework) {
20
- return commonData.trim();
21
- }
22
-
23
- const sections = srcFileData.split(/^#\s*/mu).slice(1);
24
- const matchedSection = sections.find((section) => {
25
- const [header] = section.split('\n');
26
- return header.trim().toLowerCase() === framework;
27
- });
28
-
29
- if (matchedSection) {
30
- const [header, ...body] = matchedSection.split('\n');
31
- return `${commonData.trim()}\n\n# ${header}\n${body.join('\n').trim()}`.trim();
32
- }
33
- // Если не найдено — только общий контент
34
- return commonData.trim();
13
+ const dirname = path.dirname(fileURLToPath(import.meta.url));
14
+ const src = path.join(dirname, '.npmignore');
15
+ const srcFileData = await readFile(src, 'utf8');
16
+
17
+ const [commonData] = srcFileData.split(/^#\s*\w+/mu);
18
+
19
+ if (!framework) {
20
+ return commonData.trim();
21
+ }
22
+
23
+ const sections = srcFileData.split(/^#\s*/mu).slice(1);
24
+ const matchedSection = sections.find((section) => {
25
+ const [header] = section.split('\n');
26
+ return header.trim().toLowerCase() === framework;
27
+ });
28
+
29
+ if (matchedSection) {
30
+ const [
31
+ header,
32
+ ...body
33
+ ] = matchedSection.split('\n');
34
+ return `${commonData.trim()}\n\n# ${header}\n${body.join('\n').trim()}`.trim();
35
+ }
36
+ // Если не найдено — только общий контент
37
+ return commonData.trim();
35
38
  }
36
39
 
37
40
  try {
38
- const { repositoryFramework } = await getEnvs();
39
- const srcFileData = await getGitignoreFileData(repositoryFramework);
40
- await copyWithOverride({
41
- destFile,
42
- srcFileData,
43
- fileLabel: fileName,
44
- });
41
+ const { repositoryFramework } = await getEnvs();
42
+ const srcFileData = await getGitignoreFileData(repositoryFramework);
43
+ await copyWithOverride({
44
+ destFile,
45
+ srcFileData,
46
+ fileLabel: fileName,
47
+ });
45
48
  } catch (err) {
46
- console.error('Ошибка:', err.message);
49
+ console.error('Ошибка:', err.message);
47
50
  }
@@ -8,42 +8,45 @@ import { getHeader } from '../utils/file-header.js';
8
8
  import { getSrcJSONFileData } from '../utils/file.js';
9
9
  import { getEnvs } from '../utils/env.js';
10
10
 
11
- const fileNames = ['vue.code-snippets', 'all-files.code-snippets'];
11
+ const fileNames = [
12
+ 'vue.code-snippets',
13
+ 'all-files.code-snippets',
14
+ ];
12
15
 
13
16
  try {
14
- const {
15
- isRepositoryUseTypescript: isTs,
16
- } = await getEnvs();
17
+ const {
18
+ isRepositoryUseTypescript: isTs,
19
+ } = await getEnvs();
17
20
 
18
- fileNames.forEach(async (fileName) => {
19
- const srcFileData = await getSrcJSONFileData({
20
- fileName,
21
- isTs,
22
- removeDuplicateKeys: fileName === 'vue.code-snippets',
23
- });
21
+ fileNames.forEach(async (fileName) => {
22
+ const srcFileData = await getSrcJSONFileData({
23
+ fileName,
24
+ isTs,
25
+ removeDuplicateKeys: fileName === 'vue.code-snippets',
26
+ });
24
27
 
25
- const destFile = path.join(process.cwd(), `.vscode/${fileName}`);
26
- let destFileData;
27
- let isDestFileHaveOverride;
28
- try {
29
- destFileData = await readFile(destFile, 'utf8');
30
- isDestFileHaveOverride = destFileData.includes('// override');
31
- } catch (err) {}
28
+ const destFile = path.join(process.cwd(), `.vscode/${fileName}`);
29
+ let destFileData;
30
+ let isDestFileHaveOverride;
31
+ try {
32
+ destFileData = await readFile(destFile, 'utf8');
33
+ isDestFileHaveOverride = destFileData.includes('// override');
34
+ } catch (err) {}
32
35
 
33
- let result;
34
- if (isDestFileHaveOverride) {
35
- result = await mergeWithOverride(srcFileData, destFileData);
36
- } else {
37
- result = srcFileData;
38
- }
36
+ let result;
37
+ if (isDestFileHaveOverride) {
38
+ result = await mergeWithOverride(srcFileData, destFileData);
39
+ } else {
40
+ result = srcFileData;
41
+ }
39
42
 
40
- await outputFile(destFile, `${getHeader()}${result}`);
41
- if (isDestFileHaveOverride) {
42
- console.info(`${fileName} обновлён с учётом override`);
43
- } else {
44
- console.info(`${fileName} пересоздан`);
45
- }
46
- });
43
+ await outputFile(destFile, `${getHeader()}${result}`);
44
+ if (isDestFileHaveOverride) {
45
+ console.info(`${fileName} обновлён с учётом override`);
46
+ } else {
47
+ console.info(`${fileName} пересоздан`);
48
+ }
49
+ });
47
50
  } catch (err) {
48
- console.error('Ошибка:', err.message);
51
+ console.error('Ошибка:', err.message);
49
52
  }
@@ -1,25 +1,25 @@
1
1
  {
2
- "recommendations": [
3
- // "eamodio.gitlens",
2
+ "recommendations": [
3
+ // "eamodio.gitlens",
4
4
 
5
- // typescript
6
- "johnsoncodehk.vscode-tsconfig-helper",
7
- // typescript
8
- "yoavbls.pretty-ts-errors",
9
- "vue.volar",
10
- "mrmlnc.vscode-scss",
11
- "ms-azuretools.vscode-containers",
12
- // "redhat.vscode-yaml",
13
- "savh.json5-kit",
5
+ // typescript
6
+ "johnsoncodehk.vscode-tsconfig-helper",
7
+ // typescript
8
+ "yoavbls.pretty-ts-errors",
9
+ "vue.volar",
10
+ "mrmlnc.vscode-scss",
11
+ "ms-azuretools.vscode-containers",
12
+ // "redhat.vscode-yaml",
13
+ "savh.json5-kit",
14
14
 
15
- "editorconfig.editorconfig",
16
- "dbaeumer.vscode-eslint",
17
- "stylelint.vscode-stylelint",
15
+ "editorconfig.editorconfig",
16
+ "dbaeumer.vscode-eslint",
17
+ "stylelint.vscode-stylelint",
18
18
 
19
- "streetsidesoftware.code-spell-checker",
20
- "streetsidesoftware.code-spell-checker-russian"
19
+ "streetsidesoftware.code-spell-checker",
20
+ "streetsidesoftware.code-spell-checker-russian",
21
21
 
22
22
  // need to check that it's working well
23
23
  // iulian-radu-at.find-unused-exports
24
- ],
24
+ ],
25
25
  }
@@ -12,32 +12,32 @@ const fileName = 'extensions.json';
12
12
  const destFile = path.join(process.cwd(), `.vscode/${fileName}`);
13
13
 
14
14
  try {
15
- const {
16
- isRepositoryUseTypescript: isTs,
17
- } = await getEnvs();
18
- const baseContent = await getSrcJSONFileData({
19
- fileName,
20
- isTs,
21
- });
22
- let overrideContent;
23
- try {
24
- const fileData = await readFile(destFile, 'utf8');
25
- overrideContent = fileData.includes('// override') ? fileData : undefined;
26
- } catch (err) {}
15
+ const {
16
+ isRepositoryUseTypescript: isTs,
17
+ } = await getEnvs();
18
+ const baseContent = await getSrcJSONFileData({
19
+ fileName,
20
+ isTs,
21
+ });
22
+ let overrideContent;
23
+ try {
24
+ const fileData = await readFile(destFile, 'utf8');
25
+ overrideContent = fileData.includes('// override') ? fileData : undefined;
26
+ } catch (err) {}
27
27
 
28
- let result;
29
- if (overrideContent) {
30
- result = await mergeWithOverride(baseContent, overrideContent);
31
- } else {
32
- result = baseContent;
33
- }
28
+ let result;
29
+ if (overrideContent) {
30
+ result = await mergeWithOverride(baseContent, overrideContent);
31
+ } else {
32
+ result = baseContent;
33
+ }
34
34
 
35
- await outputFile(destFile, `${getHeader()}${result}`);
36
- if (overrideContent) {
37
- console.info(`${fileName} обновлён с учётом override`);
38
- } else {
39
- console.info(`${fileName} пересоздан`);
40
- }
35
+ await outputFile(destFile, `${getHeader()}${result}`);
36
+ if (overrideContent) {
37
+ console.info(`${fileName} обновлён с учётом override`);
38
+ } else {
39
+ console.info(`${fileName} пересоздан`);
40
+ }
41
41
  } catch (err) {
42
- console.error('Ошибка:', err.message);
42
+ console.error('Ошибка:', err.message);
43
43
  }
@@ -1,42 +1,51 @@
1
1
  {
2
+ "editor.tabSize": 2,
2
3
  "editor.linkedEditing": true,
3
- "editor.suggestSelection": "recentlyUsed",
4
+ "editor.suggestSelection": "recentlyUsed",
4
5
  "git.blame.editorDecoration.enabled": true,
5
6
 
6
7
  "explorer.fileNesting.enabled": true,
7
8
  "explorer.fileNesting.patterns": {
8
9
  "frontend-configs.env.json5": "eslint.config.*s, stylelint.config.*s, .editorconfig",
9
- ".env.*.local": ".env.*",
10
- ".gitignore": ".gitattributes, lefthook.yml",
11
- // ".gitlab-ci.yml": "Dockerfile, .releaserc.template.yaml",
12
- "package.json": ".npmrc, package-lock.json",
13
- "README.md": "*.md",
14
- // typescript
15
- "tsconfig.json": "tsconfig.*.json, *.d.ts"
10
+ ".env.*.local": ".env.*",
11
+ ".gitignore": ".gitattributes, lefthook.yml",
12
+ // ".gitlab-ci.yml": "Dockerfile, .releaserc.template.yaml",
13
+ "package.json": ".npmrc, package-lock.json",
14
+ "README.md": "*.md",
15
+ // typescript
16
+ "tsconfig.json": "tsconfig.*.json, *.d.ts",
16
17
  },
17
18
 
18
19
  "javascript.preferences.importModuleSpecifier": "non-relative",
19
- // typescript
20
- "typescript.preferences.importModuleSpecifier": "non-relative",
21
- // typescript
22
- "typescript.tsdk": "./node_modules/typescript/lib",
23
- // typescript
24
- "typescript.enablePromptUseWorkspaceTsdk": true,
20
+ // typescript
21
+ "typescript.preferences.importModuleSpecifier": "non-relative",
22
+ // typescript
23
+ "typescript.tsdk": "./node_modules/typescript/lib",
24
+ // typescript
25
+ "typescript.enablePromptUseWorkspaceTsdk": true,
25
26
 
26
27
  "json.validate.enable": false,
27
- "editor.formatOnSave": false,
28
- "editor.codeActionsOnSave": {
29
- "source.fixAll.eslint": "explicit",
30
- "source.fixAll.stylelint": "explicit",
31
- },
28
+ "editor.formatOnSave": false,
29
+ "editor.codeActionsOnSave": {
30
+ "source.fixAll.eslint": "explicit",
31
+ "source.fixAll.stylelint": "explicit",
32
+ },
33
+ "eslint.validate": [
34
+ "javascript",
35
+ "typescript",
36
+ "html",
37
+ "vue",
38
+ "json",
39
+ "jsonc",
40
+ "json5",
41
+ ],
32
42
  // "stylelint.validate": [
33
- // "css",
34
- // "scss",
35
- // "vue"
36
- // ],
37
-
43
+ // "css",
44
+ // "scss",
45
+ // "vue"
46
+ // ],
38
47
  "cSpell.words": [
39
- "Cherepanov",
40
- "Pavel"
48
+ "Cherepanov",
49
+ "Pavel",
41
50
  ],
42
- }
51
+ }
@@ -12,32 +12,32 @@ const fileName = 'settings.json';
12
12
  const destFile = path.join(process.cwd(), `.vscode/${fileName}`);
13
13
 
14
14
  try {
15
- const {
16
- isRepositoryUseTypescript: isTs,
17
- } = await getEnvs();
18
- const baseContent = await getSrcJSONFileData({
19
- fileName,
20
- isTs,
21
- });
22
- let overrideContent;
23
- try {
24
- const fileData = await readFile(destFile, 'utf8');
25
- overrideContent = fileData.includes('// override') ? fileData : undefined;
26
- } catch (err) {}
15
+ const {
16
+ isRepositoryUseTypescript: isTs,
17
+ } = await getEnvs();
18
+ const baseContent = await getSrcJSONFileData({
19
+ fileName,
20
+ isTs,
21
+ });
22
+ let overrideContent;
23
+ try {
24
+ const fileData = await readFile(destFile, 'utf8');
25
+ overrideContent = fileData.includes('// override') ? fileData : undefined;
26
+ } catch (err) {}
27
27
 
28
- let result;
29
- if (overrideContent) {
30
- result = await mergeWithOverride(baseContent, overrideContent);
31
- } else {
32
- result = baseContent;
33
- }
28
+ let result;
29
+ if (overrideContent) {
30
+ result = await mergeWithOverride(baseContent, overrideContent);
31
+ } else {
32
+ result = baseContent;
33
+ }
34
34
 
35
- await outputFile(destFile, `${getHeader()}${result}`);
36
- if (overrideContent) {
37
- console.info(`${fileName} обновлён с учётом override`);
38
- } else {
39
- console.info(`${fileName} пересоздан`);
40
- }
35
+ await outputFile(destFile, `${getHeader()}${result}`);
36
+ if (overrideContent) {
37
+ console.info(`${fileName} обновлён с учётом override`);
38
+ } else {
39
+ console.info(`${fileName} пересоздан`);
40
+ }
41
41
  } catch (err) {
42
- console.error('Ошибка:', err.message);
42
+ console.error('Ошибка:', err.message);
43
43
  }
package/README.md CHANGED
@@ -51,7 +51,17 @@ import {
51
51
  jsConfig,
52
52
  tsConfig,
53
53
  vueConfig,
54
- } from '@frontend/configs/tools/eslint-config/index.js';
54
+ } from '@cherepanov.pavel/shareable-config/tools/eslint-config/index.js';
55
+ ```
56
+
57
+ Before:
58
+ ```js
59
+ import baseConfig from './tools/stylelint-config/config.js';
60
+ ```
61
+
62
+ After:
63
+ ```js
64
+ import baseConfig from '@cherepanov.pavel/shareable-config/tools/stylelint-config/config.js';
55
65
  ```
56
66
 
57
67
  5. **Override rules via the `override` function in your own configs where needed.**
@@ -70,12 +80,12 @@ import {
70
80
 
71
81
  After installing the package, run:
72
82
  ```sh
73
- npx -p "@frontend/configs" set-env
83
+ npx -p "@cherepanov.pavel/shareable-config" set-env
74
84
  ```
75
85
 
76
86
  Then run:
77
87
  ```sh
78
- npx -p "@frontend/configs" get-all
88
+ npx -p "@cherepanov.pavel/shareable-config" get-all
79
89
  ```
80
90
 
81
91
  or run any other command if you want to update partially.
package/env.json5.set.js CHANGED
@@ -5,7 +5,7 @@ import { getEnvs, setEnvs } from './utils/env.js';
5
5
 
6
6
  let envs = {};
7
7
  try {
8
- envs = await getEnvs();
8
+ envs = await getEnvs();
9
9
  } catch (err) {}
10
10
 
11
11
  envs.isRepositoryUseTypescript = await askTypescript();
package/jsconfig.json CHANGED
@@ -1,9 +1,6 @@
1
1
  {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "paths": {
5
- "@/*": ["./*"]
6
- }
7
- },
8
- "exclude": ["node_modules"]
2
+ "compilerOptions": {
3
+ "baseUrl": "."
4
+ },
5
+ "exclude": ["node_modules"]
9
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cherepanov.pavel/shareable-config",
3
3
  "description": "setup for new repositories",
4
- "version": "1.0.2",
4
+ "version": "1.0.4",
5
5
  "type": "module",
6
6
  "devEngines": {
7
7
  "packageManager": {
@@ -41,6 +41,14 @@
41
41
  "get-settings": "./.vscode/settings.json-get.js",
42
42
  "get-code-snippets": "./.vscode/.code-snippets-get.js"
43
43
  },
44
+ "scripts": {
45
+ "lint": "run-p -lc lint:js lint:css",
46
+ "lint:fix": "run-p -lc lint:js:fix lint:css:fix lint:types",
47
+ "lint:js": "eslint",
48
+ "lint:js:fix": "npm run lint:js -- --fix",
49
+ "lint:css": "stylelint \"./**/*.{css,vue}\" --ignore-path .gitignore --formatter verbose",
50
+ "lint:css:fix": "npm run lint:css:files -- --fix"
51
+ },
44
52
  "dependencies": {
45
53
  "@eslint/compat": "2.1.0",
46
54
  "@stylistic/eslint-plugin": "5.10.0",
@@ -48,8 +56,10 @@
48
56
  "@typescript-eslint/eslint-plugin": "^8.66.0",
49
57
  "@typescript-eslint/parser": "^8.66.0",
50
58
  "eslint": "^10.8.1",
59
+ "eslint-plugin-jsonc": "^3.4.1",
51
60
  "eslint-plugin-vue": "^10.10.0",
52
61
  "fs-extra": "^11.4.0",
62
+ "globals": "^17.9.0",
53
63
  "jiti": "^2.7.0",
54
64
  "json5": "^2.2.3",
55
65
  "postcss-html": "^2.0.0",
@@ -1,26 +1,29 @@
1
1
  import { defineConfig } from 'eslint/config';
2
- import { includeIgnoreFile } from '@eslint/compat';
2
+ import { includeIgnoreFile } from '@eslint/config-helpers';
3
3
  import path from 'path';
4
4
  import globals from 'globals';
5
5
 
6
6
  const gitignorePath = path.join(process.cwd(), '.gitignore');
7
7
 
8
8
  export default defineConfig([
9
- includeIgnoreFile(gitignorePath),
10
- {
11
- name: 'Additional .gitignore patterns',
12
- ignores: [
13
- 'public/js/*',
14
- '**/*.code-snippets'
15
- ],
16
- },
17
- {
18
- files: ['**/*.*js', '**/*.*vue'],
19
- languageOptions: {
20
- globals: {
21
- ...globals.browser,
22
- ...globals.node,
23
- },
24
- },
25
- },
9
+ includeIgnoreFile(gitignorePath),
10
+ {
11
+ name: 'Additional .gitignore patterns',
12
+ ignores: [
13
+ 'public/js/*',
14
+ '**/*.code-snippets',
15
+ ],
16
+ },
17
+ {
18
+ files: [
19
+ '**/*.*js',
20
+ '**/*.*vue',
21
+ ],
22
+ languageOptions: {
23
+ globals: {
24
+ ...globals.browser,
25
+ ...globals.node,
26
+ },
27
+ },
28
+ },
26
29
  ]);
@@ -4,18 +4,18 @@ import { jsRules } from '../rules/javascript/index.js';
4
4
  import { jsFormatting } from '../rules/stylistic/index.js';
5
5
 
6
6
  export default {
7
- files: ['**/*.*js'],
8
- plugins: {
9
- '@stylistic': stylisticPlugin,
10
- },
11
- languageOptions: {
12
- sourceType: 'module',
13
- parserOptions: {
14
- sourceType: 'module',
15
- },
16
- },
17
- rules: {
18
- ...jsRules,
19
- ...jsFormatting,
20
- },
7
+ files: ['**/*.*js'],
8
+ plugins: {
9
+ '@stylistic': stylisticPlugin,
10
+ },
11
+ languageOptions: {
12
+ sourceType: 'module',
13
+ parserOptions: {
14
+ sourceType: 'module',
15
+ },
16
+ },
17
+ rules: {
18
+ ...jsRules,
19
+ ...jsFormatting,
20
+ },
21
21
  };