@toptal/davinci-syntax 13.2.4 → 13.2.5-alpha-fx-2755-interactive-workflow-generation.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.
package/.eslintrc CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "extends": "./src/configs/.eslintrc"
2
+ "extends": "./src/configs/.eslintrc",
3
3
  }
package/.prettierrc.js CHANGED
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- ...require('./src/configs/.prettierrc.js')
2
+ ...require('./src/configs/.prettierrc.js'),
3
3
  }
@@ -11,6 +11,6 @@ cliEngine.loadCommands([
11
11
  initCommandCreator,
12
12
  lintCodeCommandCreator,
13
13
  lintStylesCommandCreator,
14
- lintDirsCommandCreator
14
+ lintDirsCommandCreator,
15
15
  ])
16
16
  cliEngine.bootstrap()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-syntax",
3
- "version": "13.2.4",
3
+ "version": "13.2.5-alpha-fx-2755-interactive-workflow-generation.4+46405792",
4
4
  "description": "Lint and prettier support",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -31,9 +31,9 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@stylelint/postcss-css-in-js": "^0.37.2",
34
- "@toptal/davinci-cli-shared": "1.5.2",
35
- "@toptal/davinci-dir-lint": "^0.1.0",
36
- "@toptal/eslint-plugin-davinci": "5.2.0",
34
+ "@toptal/davinci-cli-shared": "1.5.3-alpha-fx-2755-interactive-workflow-generation.4+46405792",
35
+ "@toptal/davinci-dir-lint": "0.1.1-alpha-fx-2755-interactive-workflow-generation.85+46405792",
36
+ "@toptal/eslint-plugin-davinci": "5.2.1-alpha-fx-2755-interactive-workflow-generation.23+46405792",
37
37
  "@typescript-eslint/eslint-plugin": "^5.19.0",
38
38
  "@typescript-eslint/parser": "^5.26.0",
39
39
  "eslint": "^8.13.0",
@@ -43,7 +43,7 @@
43
43
  "eslint-config-standard-jsx": "^10.0.0",
44
44
  "eslint-plugin-cypress": "^2.12.1",
45
45
  "eslint-plugin-import": "^2.26.0",
46
- "eslint-plugin-jest": "^26.1.4",
46
+ "eslint-plugin-jest": "^26.4.5",
47
47
  "eslint-plugin-jest-formatting": "^3.1.0",
48
48
  "eslint-plugin-no-inline-styles": "^1.0.5",
49
49
  "eslint-plugin-node": "^11.1.0",
@@ -68,5 +68,6 @@
68
68
  },
69
69
  "peerDependencies": {
70
70
  "typescript": "^3 || ^4"
71
- }
71
+ },
72
+ "gitHead": "46405792bfc49fdb4b954b2ca9ddbb9ce8660801"
72
73
  }
@@ -6,7 +6,7 @@ const copyConfigFile = async ({
6
6
  copyFromFile,
7
7
  copyToFile,
8
8
  promptName,
9
- promptText
9
+ promptText,
10
10
  }) => {
11
11
  if (fs.existsSync(copyToFile)) {
12
12
  const shouldRewrite = await prompt.confirm(promptName, promptText)
@@ -24,7 +24,7 @@ const copyLintConfigFile = (rootDir, currentRunningDir) => {
24
24
  copyFromFile: path.join(rootDir, './src/configs/to-copy/root.eslintrc'),
25
25
  copyToFile: path.join(currentRunningDir, './.eslintrc'),
26
26
  promptName: 'eslintrc',
27
- promptText: 'Do you want to override your existing .eslintrc file?'
27
+ promptText: 'Do you want to override your existing .eslintrc file?',
28
28
  })
29
29
  }
30
30
 
@@ -33,7 +33,7 @@ const copyLintIgnoreFile = (rootDir, currentRunningDir) => {
33
33
  copyFromFile: path.join(rootDir, './src/configs/to-copy/root.eslintignore'),
34
34
  copyToFile: path.join(currentRunningDir, './.eslintignore'),
35
35
  promptName: 'eslintignore',
36
- promptText: 'Do you want to override your existing .eslintignore file?'
36
+ promptText: 'Do you want to override your existing .eslintignore file?',
37
37
  })
38
38
  }
39
39
 
@@ -45,7 +45,7 @@ const copyPrettierConfigFile = (rootDir, currentRunningDir) => {
45
45
  ),
46
46
  copyToFile: path.join(currentRunningDir, './.prettierrc.js'),
47
47
  promptName: 'prettierrc',
48
- promptText: 'Do you want to override your existing .prettierrc.js file?'
48
+ promptText: 'Do you want to override your existing .prettierrc.js file?',
49
49
  })
50
50
  }
51
51
 
@@ -54,7 +54,7 @@ const copyEditorConfigFile = (rootDir, currentRunningDir) => {
54
54
  copyFromFile: path.join(rootDir, './src/configs/to-copy/root.editorconfig'),
55
55
  copyToFile: path.join(currentRunningDir, './.editorconfig'),
56
56
  promptName: 'editorconfig',
57
- promptText: 'Do you want to override your existing .editorconfig file?'
57
+ promptText: 'Do you want to override your existing .editorconfig file?',
58
58
  })
59
59
  }
60
60
 
@@ -63,7 +63,7 @@ const copyStylelintConfigFile = (rootDir, currentRunningDir) => {
63
63
  copyFromFile: path.join(rootDir, './src/configs/to-copy/root.stylelintrc'),
64
64
  copyToFile: path.join(currentRunningDir, './.stylelintrc'),
65
65
  promptName: 'stylelintrc',
66
- promptText: 'Do you want to override your existing .stylelintrc file?'
66
+ promptText: 'Do you want to override your existing .stylelintrc file?',
67
67
  })
68
68
  }
69
69
 
@@ -134,14 +134,14 @@ const addLintStagedCommands = async currentRunningDir => {
134
134
  'styles.{js,jsx,ts,tsx}': [
135
135
  'davinci syntax lint styles',
136
136
  'prettier',
137
- 'git add'
138
- ]
137
+ 'git add',
138
+ ],
139
139
  }
140
140
  // add husky
141
141
  config.husky = {
142
142
  hooks: {
143
- 'pre-commit': 'lint-staged'
144
- }
143
+ 'pre-commit': 'lint-staged',
144
+ },
145
145
  }
146
146
 
147
147
  const modifiedConfigData = JSON.stringify(config, null, 2).concat('\n')
@@ -177,7 +177,7 @@ const initCommandCreator = {
177
177
  initCommand()
178
178
  },
179
179
  command: 'init',
180
- description: 'Init the syntax package'
180
+ description: 'Init the syntax package',
181
181
  }
182
182
 
183
183
  module.exports = initCommandCreator
@@ -1,14 +1,14 @@
1
1
  const {
2
2
  runSync,
3
3
  print,
4
- convertToCLIParameters
4
+ convertToCLIParameters,
5
5
  } = require('@toptal/davinci-cli-shared')
6
6
 
7
7
  const commandOptions = [
8
8
  {
9
9
  label: 'check only, without fixing the code',
10
- name: '--check'
11
- }
10
+ name: '--check',
11
+ },
12
12
  ]
13
13
 
14
14
  const lintCodeCommand = ({ paths, options }) => {
@@ -24,7 +24,7 @@ const lintCodeCommand = ({ paths, options }) => {
24
24
  '--color',
25
25
  !check && '--fix',
26
26
  ...convertToCLIParameters(restOptions),
27
- ...paths
27
+ ...paths,
28
28
  ].filter(Boolean)
29
29
  )
30
30
  }
@@ -34,7 +34,7 @@ const lintCodeCommandCreator = {
34
34
  allowUnknownOptions: true,
35
35
  command: 'lint code [paths...]',
36
36
  description: 'Lint the code',
37
- options: commandOptions
37
+ options: commandOptions,
38
38
  }
39
39
 
40
40
  module.exports = lintCodeCommandCreator
@@ -23,7 +23,7 @@ const lintDirsCommand = ({ paths }) => {
23
23
  const lintDirsCommandCreator = {
24
24
  action: lintDirsCommand,
25
25
  command: 'lint dirs [paths...]',
26
- description: 'Lint the folder structure and naming'
26
+ description: 'Lint the folder structure and naming',
27
27
  }
28
28
 
29
29
  module.exports = lintDirsCommandCreator
@@ -14,7 +14,7 @@ const lintStylesCommand = dir => {
14
14
  [
15
15
  'stylelint',
16
16
  '--allow-empty-input',
17
- hasExtension ? dir : `${dir}/**/styles.(js|jsx|ts|tsx)`
17
+ hasExtension ? dir : `${dir}/**/styles.(js|jsx|ts|tsx)`,
18
18
  ].filter(Boolean)
19
19
  )
20
20
  }
@@ -26,7 +26,7 @@ const lintStylesCommandCreator = {
26
26
  return lintStylesCommand(dir)
27
27
  },
28
28
  command: 'lint styles <dir>',
29
- description: 'Lint styles'
29
+ description: 'Lint styles',
30
30
  }
31
31
 
32
32
  module.exports = lintStylesCommandCreator
@@ -311,6 +311,20 @@
311
311
  "todo-plz/ticket-ref": [
312
312
  "warn",
313
313
  { "commentPattern": "TODO:\\s(.|\\n|\\r)*\\[(\\w+-[0-9]+[,\\s]*)+\\].*" }
314
+ ],
315
+ "comma-dangle": "off", // Turned off in favor of the typescript-eslint alternative
316
+ "@typescript-eslint/comma-dangle": [
317
+ "error",
318
+ {
319
+ "arrays": "always-multiline",
320
+ "objects": "always-multiline",
321
+ "imports": "always-multiline",
322
+ "exports": "always-multiline",
323
+ "functions": "never",
324
+ "enums": "never",
325
+ "generics": "ignore",
326
+ "tuples": "never"
327
+ }
314
328
  ]
315
329
  },
316
330
  "overrides": [
@@ -5,8 +5,8 @@ module.exports = {
5
5
  semi: false,
6
6
  singleQuote: true,
7
7
  jsxSingleQuote: true,
8
- trailingComma: 'none',
8
+ trailingComma: 'es5',
9
9
  bracketSpacing: true,
10
10
  bracketSameLine: false,
11
- arrowParens: 'avoid'
11
+ arrowParens: 'avoid',
12
12
  }
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- ...require('@toptal/davinci-syntax/src/configs/.prettierrc.js')
2
+ ...require('@toptal/davinci-syntax/src/configs/.prettierrc.js'),
3
3
  }
package/src/index.js CHANGED
@@ -8,6 +8,6 @@ module.exports = {
8
8
  initCommandCreator,
9
9
  lintCodeCommandCreator,
10
10
  lintStylesCommandCreator,
11
- lintDirsCommandCreator
12
- ]
11
+ lintDirsCommandCreator,
12
+ ],
13
13
  }
@@ -1,72 +0,0 @@
1
- {
2
- "name": "@toptal/davinci-syntax",
3
- "version": "13.2.4",
4
- "description": "Lint and prettier support",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "keywords": [
9
- "lint"
10
- ],
11
- "author": "Toptal",
12
- "homepage": "https://github.com/toptal/davinci/tree/master/packages/syntax#readme",
13
- "license": "ISC",
14
- "main": "src/index.js",
15
- "bin": {
16
- "davinci-syntax": "bin/davinci-syntax.js"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/toptal/davinci.git"
21
- },
22
- "scripts": {
23
- "build:package": "../../bin/build-package.js",
24
- "prepublishOnly": "../../bin/prepublish.js",
25
- "lint:path": "eslint --ext=.js,.jsx,.ts,.tsx --color --fix",
26
- "lint": "yarn run lint:path .",
27
- "test": "echo \"Error: run tests from root\" && exit 1"
28
- },
29
- "bugs": {
30
- "url": "https://github.com/toptal/davinci/issues"
31
- },
32
- "dependencies": {
33
- "@stylelint/postcss-css-in-js": "^0.37.2",
34
- "@toptal/davinci-cli-shared": "1.5.2",
35
- "@toptal/davinci-dir-lint": "^0.1.0",
36
- "@toptal/eslint-plugin-davinci": "5.2.0",
37
- "@typescript-eslint/eslint-plugin": "^5.19.0",
38
- "@typescript-eslint/parser": "^5.26.0",
39
- "eslint": "^8.13.0",
40
- "eslint-config-prettier": "^8.5.0",
41
- "eslint-config-prettier-standard": "^4.0.1",
42
- "eslint-config-standard": "^17.0.0",
43
- "eslint-config-standard-jsx": "^10.0.0",
44
- "eslint-plugin-cypress": "^2.12.1",
45
- "eslint-plugin-import": "^2.26.0",
46
- "eslint-plugin-jest": "^26.1.4",
47
- "eslint-plugin-jest-formatting": "^3.1.0",
48
- "eslint-plugin-no-inline-styles": "^1.0.5",
49
- "eslint-plugin-node": "^11.1.0",
50
- "eslint-plugin-prettier": "^4.0.0",
51
- "eslint-plugin-promise": "^6.0.0",
52
- "eslint-plugin-react": "^7.29.4",
53
- "eslint-plugin-react-hooks": "^4.4.0",
54
- "eslint-plugin-todo-plz": "^1.2.1",
55
- "eslint-plugin-unused-imports": "2.0.0",
56
- "husky": "^7.0.4",
57
- "lint-staged": "^12.4.3",
58
- "postcss-syntax": "^0.36.2",
59
- "prettier": "^2.6.2",
60
- "prettier-config-standard": "^5.0.0",
61
- "stylelint": "^14.1.0",
62
- "stylelint-config-standard": "^24.0.0",
63
- "stylelint-config-styled-components": "^0.1.1",
64
- "stylelint-processor-styled-components": "^1.10.0"
65
- },
66
- "devDependencies": {
67
- "json5": "^2.2.0"
68
- },
69
- "peerDependencies": {
70
- "typescript": "^3 || ^4"
71
- }
72
- }