Skip to content

Commit 4020e77

Browse files
authored
test: add stylistic rules (comma-dangle, quotes and semi) (#958)
1 parent a67c687 commit 4020e77

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

eslint.config.mjs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,25 @@ export default [
1111
mochaPlugin.configs.recommended,
1212
pluginCypress.configs.recommended,
1313
{
14-
ignores: ['app/assets/js/vendor/']
14+
ignores: ['app/assets/js/vendor/'],
1515
},
1616
{
1717
plugins: {
1818
'@stylistic': stylistic,
1919
},
2020
rules: {
2121
'@stylistic/indent': ['error', 2, { 'SwitchCase': 1, 'MemberExpression': 'off' }],
22+
'@stylistic/comma-dangle': ['error', 'always-multiline'],
23+
'@stylistic/quotes': ['error', 'single'],
24+
'@stylistic/semi': ['error', 'never'],
2225
'mocha/no-exclusive-tests': 'error',
2326
'mocha/no-pending-tests': 'error',
24-
'mocha/no-mocha-arrows': 'off'
27+
'mocha/no-mocha-arrows': 'off',
2528
},
2629
languageOptions: {
2730
globals: {
28-
...globals.node
31+
...globals.node,
2932
},
30-
}
31-
}
33+
},
34+
},
3235
]

scripts/set-port.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-env node */
2-
2+
33
const { readFileSync, writeFileSync } = require('fs')
44

55
// On some CIs like Heroku CI the host assigns random PORT and

scripts/start.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ const { execSync } = require('child_process')
33
const port = process.env.PORT || 8080
44
let cmd = `serve --listen ${port} --no-request-logging`
55

6-
if (process.env.CI) cmd += ` --no-clipboard`
6+
if (process.env.CI) cmd += ' --no-clipboard'
77

88
if (process.argv.length > 2) cmd += ` ${process.argv.slice(2).join(' ')}`
99

10-
1110
console.log(`Running "${cmd}"...`)
1211

1312
execSync(cmd, { stdio: 'inherit' })

0 commit comments

Comments
 (0)