Skip to content

Commit

Permalink
fix: allow npx and config overrides (#79)
Browse files Browse the repository at this point in the history
* fix: allow npx and config overrides

* chore: update deps

* fix: plugin resolution
  • Loading branch information
codyzu authored Oct 6, 2021
1 parent f9723ab commit 825eac8
Show file tree
Hide file tree
Showing 4 changed files with 14,314 additions and 534 deletions.
8 changes: 5 additions & 3 deletions eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module.exports = {
extends: [
'airbnb',
'prettier'
// Resolve to absolute paths so it can be found relative to wherever eslint is running
require.resolve('eslint-config-airbnb'),
require.resolve('eslint-config-prettier')
],

parser: '@babel/eslint-parser',
// Resolve to absolute path so it can be found relative to wherever eslint is running
parser: require.resolve('@babel/eslint-parser'),
parserOptions: {
requireConfigFile: false
},
Expand Down
7 changes: 4 additions & 3 deletions options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const eslint = require('eslint')
const path = require('path')
const pkg = require('./package.json')
const baseConfig = require('./eslintrc')

module.exports = {
version: pkg.version,
Expand All @@ -10,8 +10,9 @@ module.exports = {
cmd: 'telus-standard',
tagline: 'Use TELUS JavaScript Standard Style',
eslintConfig: {
configFile: path.join(__dirname, './eslintrc.js'),
baseConfig,
useEslintrc: true,
cache: false
cache: false,
resolvePluginsRelativeTo: __dirname
}
}
Loading

0 comments on commit 825eac8

Please sign in to comment.