Answer the question
In order to leave comments, you need to log in
How to split the redux store configuration into two files so that @typescript-eslint doesn't swear?
This is how i choose configuration for redux store depending on dev or prod build
const configureAppStore =
process.env.NODE_ENV === 'development'
? require('./configureAppStore.dev.ts').default
: require('./configureAppStore.prod.ts').default;
export default configureAppStore();
/*
eslint-disable
@typescript-eslint/no-unsafe-assignment,
@typescript-eslint/no-unsafe-member-access,
@typescript-eslint/no-var-requires,
@typescript-eslint/no-unsafe-call
*/
Answer the question
In order to leave comments, you need to log in
Eslint looks file-by-file, there is no call in this module, so it swears.
The official documentation (eslint.org/docs/rules/no-unused-vars) says what to do about it.
Well, in general, why did Array.forEach not suit you?
And actually the solution:
rules: [
{
test: /\.ts$/,
loader: 'babel-loader',
exclude: /(node_modules|bower_components)/,
},
{
test: /\.ts$/,
loader: 'eslint-loader',
include: [
path.resolve(__dirname, "src"),
],
},
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question