ESLint plugin with the containerbase lint rules.
Enable all rules with the all config in your eslint.config.js:
import containerbase from '@containerbase/eslint-plugin';
export default [containerbase.configs.all];Or pick single rules:
import containerbase from '@containerbase/eslint-plugin';
export default [
{
plugins: { '@containerbase': containerbase },
rules: {
'@containerbase/enforce-ts-extension': 'error',
'@containerbase/test-root-describe': 'error',
},
},
];enforce-ts-extension: in TypeScript files, local imports and exports (relative or~aliased) use.tsinstead of.js, and local paths invi.mockand friends have a file extension. Fixable.test-root-describe: the rootdescribeof a spec file is named after its path, withoutsrc/,lib/ortest/and the.spec.tssuffix. Fixable.
Node.js, pnpm, jactionlint, shellcheck and zizmor are pinned in mise.toml, so mise installs them with mise install, then pnpm install --frozen-lockfile installs the dependencies.
Without mise, install Node.js and pnpm yourself and run only pnpm install --frozen-lockfile.
mise install
pnpm install --frozen-lockfile
pnpm lint
pnpm test
jactionlint
zizmor .github/pnpm lint-fixfixes the formatting and the fixable lint findings.jactionlintchecks the GitHub workflows andzizmor .github/audits them. CI runs both through mise in thelintjob.