[email protected]
requires a flat config format (see their
migration guide) in order to run.
Trunk will automatically detect which config file you have and by default will only enable a
compatible version.
Here is a conversion guide for ESLint-style ignores and trunk-ignores:
alert("foo"); // trunk-ignore(eslint)
alert("foo"); // eslint-disable-line
// trunk-ignore(eslint)
alert("foo");
/* eslint-disable-next-line */
alert("foo");
// trunk-ignore(eslint): Expected alert
alert("foo");
/* eslint-disable-next-line -- Expected alert */
alert("foo");
// trunk-ignore(eslint/no-alert)
alert("foo");
/* eslint-disable-next-line no-alert */
alert("foo");
// trunk-ignore(eslint/no-alert,eslint/quotes)
alert("foo");
/* eslint-disable-next-line no-alert, quotes */
alert("foo");
// trunk-ignore-begin(eslint/no-alert)
alert("foo");
// trunk-ignore-end(eslint/no-alert)
/* eslint-disable no-alert */
alert("foo");
/* eslint-enable no-alert */
// trunk-ignore-all(eslint/no-alert)
alert("foo");
/* eslint-disable no-alert */
alert("foo");
Only eslint-disable-line
and eslint-disable-next-line
support //
comments. All other
ESLint-style ignores must use /* */
comments. The full set of rules and their applicable files can
be configured in an
eslint config file.