uxp-linter-test-app
Version:
UXP LINTER is useful for linting your code with ESLint rules and guidelines.
82 lines • 3.7 kB
JavaScript
exports.rules_category = [
{ category: 'essential', option: 0, label: 'Essential', description: 'to prevent uninteded behavior' },
{ category: 'recommended', option: 1, label: 'Recommended', description: 'to further improve code quality' },
{ category: 'custom', option: 2, label: 'Custom', description: 'reads rules from user-defined file' },
{ category: 'sonar', option: 3, label: 'Sonar', description: 'shows errors which sonarqube captures' }
];
exports.cssLinterPackageName = ['stylelint@13.13.1', 'stylelint-config-standard@22.0.0', 'stylelint-rscss'];
exports.cssUninstallPackageName = ['stylelint', 'stylelint-config-standard', 'stylelint-rscss'];
exports.htmlLinterPackageName = ['eslint-plugin-html'];
exports.prettierPackageName = ['prettier'];
exports.htmlConfigFileName = '.eslintrc-html.json';
exports.fileTypeArray = [".eslintrc.js", ".eslintrc.cjs", ".eslintrc.yaml", ".eslintrc.yml", ".eslintrc.json", ".eslintrc"];
exports.prettierTypeArray = [".prettierrc"];
exports.allowedFormats = [
{ type: 'html', ext: 'html' },
{ type: 'checkstyle', ext: 'xml' },
{ type: 'compact', ext: 'txt' },
{ type: 'jslint-xml', ext: 'xml' },
{ type: 'json-with-metadata', ext: 'json' },
{ type: 'json', ext: 'json' },
{ type: 'junit', ext: 'xml' },
{ type: 'stylish', ext: 'txt' },
{ type: 'tap', ext: 'txt' },
{ type: 'unix', ext: 'txt' },
{ type: 'visualstudio', ext: 'txt' },
{ type: 'sonar', ext: 'json' },
];
exports.outputDirectory = './reports';
exports.allOptions = [
{ 'option': 0, 'text': 'JS Linter.', type: 'js' },
{ 'option': 1, 'text': 'HTML Linter.', type: 'html' },
{ 'option': 2, 'text': 'CSS Linter.', type: 'css' },
{ 'option': 3, 'text': 'Prettier', type: 'prettier' },
];
exports.allLinterOptions = [
{ 'option': 0, 'text': 'Install JS Linter.' },
{ 'option': 1, 'text': 'Install HTML Linter.' },
{ 'option': 2, 'text': 'Install CSS Linter.' },
{ 'option': 3, 'text': 'Install Prettier.' },
{ 'option': 4, 'text': 'Uninstall UXP Linter completely.' },
{ 'option': 5, 'text': 'Uninstall JS Linter.' },
{ 'option': 6, 'text': 'Uninstall HTML Linter.' },
{ 'option': 7, 'text': 'Uninstall CSS Linter.' },
{ 'option': 8, 'text': 'Uninstall Prettier.' },
{ 'option': 9, 'text': 'Select JS Linter Rules Profile.' },
{ 'option': 10, 'text': 'Change Linter Path.' },
// { 'option': 11, 'text': 'Initialize Sonar Properties file' },
// { 'option': 12, 'text': 'Remove Sonar Properties file' },
];
exports.allowedCSSFormats = [
{ type: 'compact', ext: 'txt' },
{ type: 'json', ext: 'json' },
{ type: 'string', ext: 'txt' },
{ type: 'tap', ext: 'txt' },
{ type: 'unix', ext: 'txt' },
{ type: 'verbose', ext: 'txt' },
];
exports.defaultRule = 'advance';
exports.eslintPrefix = 'eslint-config-impetus-basetest';
exports.uxplinterrcInitialConfig = {
"js-linter": false,
"html-linter": false,
"css-linter": false,
"prettier": false,
"path": "",
"projectType": "",
"languageType": "",
"linterProfile": "Essential",
// "sonar-properties-initialized": false
};
exports.noPackageJson = {
"scripts": {}
};
exports.jsLintCommand = 'eslint --ext ts,tsx,js,jsx,vue $path';
exports.jsReportCommand = 'eslint --quiet --ext js,jsx,snap,md,ts,tsx,vue $path';
exports.htmlLintCommand = 'eslint --ext html --no-eslintrc -c .eslintrc-html.json $path';
exports.htmlReportCommand = 'eslint --quiet --ext html --no-eslintrc -c .eslintrc-html.json $path';
exports.cssLintCommand = 'stylelint $path**/**.{css,scss,sass}';
exports.cssReportCommand = 'stylelint $path**/**.{css,scss,sass}';
exports.prettierLintCommand = 'npx prettier $path';
exports.defaultLinterPath = './';
exports.safeNodeVersionForPeerDeps = '16';