Skip to content

Commit

Permalink
eslint: fixes linebreak-style bug in eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
kaelzhang committed Dec 20, 2024
1 parent 5e756a4 commit 0e91185
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
// http://eslint.org/docs/user-guide/configuring

const rules = {
'no-underscore-dangle': ['error', {
allowAfterThis: true,
enforceInMethodNames: false,
// node-ignore only
allow: ['_rules', '_test']
}],

'operator-linebreak': 0,

indent: ['error', 2, {
MemberExpression: 0,

// Eslint bug
ignoreComments: true
}]
}

if (process.platform === 'win32') {
// Ignore linebreak-style on Windows, due to a bug of eslint
rules['linebreak-style'] = 0
}

module.exports = {
// Uses `require.resolve` to support npm linked eslint-config
extends: require.resolve('eslint-config-ostai'),
root: true,
rules: {
'no-underscore-dangle': ['error', {
allowAfterThis: true,
enforceInMethodNames: false,
// node-ignore only
allow: ['_rules', '_test']
}],

'operator-linebreak': 0,

indent: ['error', 2, {
MemberExpression: 0,

// Eslint bug
ignoreComments: true
}]
}
rules
}

0 comments on commit 0e91185

Please sign in to comment.