@zohodesk/codestandard-validator 1.0.0-exp-10 → 1.0.0-exp-12

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.
@@ -24,6 +24,13 @@ const {
24
24
  const {
25
25
  writeFsPaths
26
26
  } = require("../utils/General/writeProjectDetailsToJson");
27
+ const {
28
+ getNodeModulesPath
29
+ } = require("../utils/General/getNodeModulesPath");
30
+ const config = require(path.join(getNodeModulesPath(), 'lint.config.js'));
31
+ process.env.SONARQUBE_EXTERNAL = config.metric_token;
32
+ process.env.SONARQUBE = config.meticHandler_api_token;
33
+ process.env.ZGIT_TOKEN = config.token;
27
34
 
28
35
  /**
29
36
  * @function {postInstall} - This methods setup husky and configuration for executing project
package/index.js CHANGED
@@ -1,60 +1,10 @@
1
1
  const { getLintConfigurationUtil } = require("./build/utils/ConfigFileUtils/getLintConfiguration");
2
2
  const { rulesConfig, plugins, extendPlugins } = getLintConfigurationUtil();
3
3
 
4
+
5
+
4
6
  module.exports = {
5
7
  rulesConfig,
6
8
  plugins,
7
9
  extendPlugins
8
- };
9
-
10
-
11
-
12
- function config() {
13
- return {
14
- addConfig(conf){
15
- return conf
16
- },
17
- addRule(){
18
-
19
- }
20
- };
21
- }
22
-
23
-
24
-
25
- const rule = {
26
- meta: {
27
- type: "problem",
28
- docs:{
29
- description: "Disallow the use of 'debugger' statements",
30
- category: "Possible Errors",
31
- recommended: true,
32
- },
33
- schema: [], // No options for this rule
34
- messages: {
35
- noDebugger: "Unexpected 'debugger' statement.",
36
- },
37
- },
38
- create(){
39
- return {
40
- DebuggerStatement(node) {
41
- context.report({
42
- node,
43
- messageId: "noDebugger",
44
- });
45
- },
46
- };
47
- }
48
- };
49
-
50
-
51
- const { addConfig, addRule } = config()
52
-
53
- addRule([{name:"dummyrule",conf:rule}])
54
-
55
- addConfig([{
56
- files: ["config/*.js"],
57
- rules: {
58
- "no-console": "off",
59
- },
60
- }])
10
+ };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@zohodesk/codestandard-validator",
3
- "version": "1.0.0-exp-10",
3
+ "version": "1.0.0-exp-12",
4
4
  "description": "library to enforce code standard using eslint",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
- "postinstall": "node bin/postinstall.js",
8
+
9
9
  "build": "babel -d ./build ./src --copy-files"
10
10
  },
11
11
  "author": "",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "commonjs",
17
17
  "dependencies": {
18
- "@zohodesk/codestandard-analytics": "1.0.2-exp-13",
18
+ "@zohodesk/codestandard-analytics": "1.0.2-exp-14",
19
19
  "@zohodesk-private/client_deployment_tool": "0.0.5",
20
20
  "eslint": "8.26.0",
21
21
  "stylelint": "16.23.0"