fix: work around ljharb's ignorance

This commit is contained in:
cha0s 2021-03-31 10:35:43 -05:00
parent d484d0d30f
commit 97d90ee809
4 changed files with 25 additions and 7 deletions

View File

@ -25,6 +25,7 @@
],
"dependencies": {
"@babel/eslint-parser": "^7.13.10",
"@babel/eslint-plugin": "^7.13.10",
"@babel/parser": "^7.13.12",
"@babel/plugin-proposal-class-properties": "^7.12.13",
"@babel/plugin-proposal-optional-chaining": "^7.12.16",

View File

@ -20,6 +20,9 @@ const config = {
configFile: LATUS_BABEL_CONFIG,
},
},
plugins: [
'@babel',
],
rules: {
'babel/object-curly-spacing': 'off',
'brace-style': ['error', 'stroustrup'],

View File

@ -11,12 +11,20 @@ const {
module.exports = {
options: {},
use: [
airbnb({
eslint: {
cache: false,
baseConfig: require(LATUS_ESLINT_DEFAULTS),
},
}),
(neutrino) => {
const baseConfig = require(LATUS_ESLINT_DEFAULTS);
const {peerDependencies = {}} = neutrino.options.packageJson;
const peerPaths = Object.keys(peerDependencies);
if (peerPaths.length > 0) {
baseConfig.rules['import/no-unresolved'] = ['error', {ignore: peerPaths}];
}
airbnb({
eslint: {
cache: false,
baseConfig,
},
})(neutrino);
},
react(),
library(),
mocha(),

View File

@ -18,10 +18,16 @@ const {
export default (latus) => (neutrino) => {
const airbnb = R('@neutrinojs/airbnb');
const baseConfig = R(LATUS_ESLINT_DEFAULTS);
const {peerDependencies = {}} = neutrino.options.packageJson;
const peerPaths = Object.keys(peerDependencies);
if (peerPaths.length > 0) {
baseConfig.rules['import/no-unresolved'] = ['error', {ignore: peerPaths}];
}
airbnb({
eslint: {
cache: false,
baseConfig: R(LATUS_ESLINT_DEFAULTS),
baseConfig,
},
})(neutrino);
const clean = R('@neutrinojs/clean');