Skip to content

Commit 237afd6

Browse files
committed
migrate to eslintrc.js
1 parent 9641211 commit 237afd6

File tree

3 files changed

+44
-7
lines changed

3 files changed

+44
-7
lines changed

.eslintrc.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const _ = require('lodash')
2+
const shared = require('eslint-config-zardoy')
3+
4+
const props = ['ignorePatterns', 'root']
5+
const topLevelShared = _.pick(shared, props)
6+
Object.assign(shared.rules, {
7+
curly: 'off',
8+
'import/no-deprecated': 'off',
9+
})
10+
11+
// verbose solution to just eslint-plugin-disable plugin which doesn't work with eslint 8
12+
13+
/** @type {import('eslint').ESLint.ConfigData} */
14+
const config = {
15+
overrides: [
16+
{
17+
files: 'src/**',
18+
// extends: 'zardoy',
19+
// ...shared,
20+
},
21+
{
22+
files: 'typescript/**',
23+
..._.defaultsDeep(
24+
{
25+
parserOptions: {
26+
project: 'typescript/tsconfig.json',
27+
},
28+
rules: {
29+
'@typescript-eslint/padding-line-between-statements': 'off',
30+
'arrow-body-style': 'off',
31+
'import/no-extraneous-dependencies': 'off',
32+
complexity: 'off',
33+
},
34+
},
35+
_.omit(shared, props),
36+
),
37+
plugins: shared.plugins /* .filter(plugin => plugin !== 'import'), */,
38+
},
39+
],
40+
...topLevelShared,
41+
}
42+
43+
module.exports = config

.eslintrc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/sendCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const sendCommand = async <Response, K = any>(
2222
const message = 'Special commands are not supported in Volar takeover mode'
2323
if (passthroughExposedApiCommands.includes(command as any)) {
2424
// don't spam in case of api command
25-
console.error(message)
25+
console.error(`[${command}] ${message}`)
2626
} else {
2727
throw new Error(message)
2828
}

0 commit comments

Comments
 (0)