forked from salesforce/salesforcedx-vscode-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.ts
More file actions
61 lines (53 loc) · 2.16 KB
/
constants.ts
File metadata and controls
61 lines (53 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (c) 2023, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
export const MINIMUM_REQUIRED_VERSION_CORE_EXTENSION = '66.0.3';
export const CORE_EXTENSION_ID = 'salesforce.salesforcedx-vscode-core';
export const SFDX_PROJECT_FILE = 'sfdx-project.json';
export const PACKAGE_JSON = 'package.json';
export const JSON_INDENTATION_SPACES = 2;
// Legacy ESLint configuration file for eslint < 9.x
export const ESLINT_RC_FILE = '.eslintrc.json';
// Default eslint 9 flat configuration file
export const ESLINT_CONFIG_FILE = 'eslint.config.js';
export const ESLINT_CONFIG_FILE_CONTENT_WITH_USER_CONFIG = `
const { defineConfig } = require('eslint/config');
const eslintConfigMobile = require('./eslint.config.mobile');
const eslintConfigUser = require('./eslint.config.user');
module.exports = defineConfig([
...eslintConfigUser,
...eslintConfigMobile
]);
`;
export const ESLINT_CONFIG_FILE_CONTENT_WITHOUT_USER_CONFIG = `
const { defineConfig } = require('eslint/config');
const eslintConfigMobile = require('./eslint.config.mobile');
module.exports = defineConfig([
...eslintConfigMobile,
]);
`;
// Mobile eslint configuration file
export const ESLINT_CONFIG_MOBILE_FILE = 'eslint.config.mobile.js';
export const ESLINT_CONFIG_MOBILE_FILE_CONTENT = `
const eslintJs = require('@eslint/js');
const { defineConfig } = require('eslint/config');
const lwcMobilePlugin = require('@salesforce/eslint-plugin-lwc-mobile');
const lwcGraphAnalyzerPlugin = require('@salesforce/eslint-plugin-lwc-graph-analyzer');
module.exports = defineConfig([
// Salesforce LWC Mobile plugin configuration
{
plugins: {
"@salesforce/lwc-mobile": lwcMobilePlugin,
"@salesforce/lwc-graph-analyzer": lwcGraphAnalyzerPlugin
}
},
eslintJs.configs.recommended,
lwcGraphAnalyzerPlugin.configs.recommended,
...lwcMobilePlugin.recommendedConfigs
]);
`;
// User eslint configuration file, contains the original eslint.config.js file content after ConfigureLintingToolsCommand's execution
export const ESLINT_CONFIG_USER_FILE = 'eslint.config.user.js';