-
// .swcrc
{
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true
}
},
"module": {
"type": "commonjs"
}
} // eslint.ts
import { ESLint } from 'eslint';
import minimist from 'minimist';
const args = minimist(process.argv.slice(2));
const runner = new ESLint({
fix: args.fix,
useEslintrc: true,
cwd: process.cwd(),
ignorePath: args['ignore-path']
});
const runESLint = async () => {
const chalk = (await import('chalk')).default;
const report = await runner.lintFiles(args._);
if (
report.reduce(
(prev, curr) =>
prev + curr.errorCount + curr.fatalErrorCount + curr.warningCount,
0
) > 0
) {
const formatter = await runner.loadFormatter();
console.log(formatter.format(report));
process.exit(1);
}
console.log(chalk.greenBright('✔ No ESLint warnings or errors'));
};
runESLint(); How do I not transform |
Beta Was this translation helpful? Give feedback.
Answered by
kdy1
Mar 1, 2022
Replies: 1 comment 3 replies
-
I think we need a new option for this, can you file an issue? |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
samchouse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think we need a new option for this, can you file an issue?