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 and jactionlint are pinned in mise.toml, so mise installs them and the dependencies with mise install.
Without mise, install the dependencies with pnpm install.
mise install
pnpm lint
pnpm test
jactionlintpnpm lint-fixfixes the formatting and the fixable lint findings.jactionlintchecks the GitHub workflows.