@adhamu/zero
v6.1.0
Published
Shared linting and formatting configurations
Downloads
134
Maintainers
Readme
Zero
Shared linting and formatting configurations.
Includes
Installation
yarn add @adhamu/zero -D
Usage
Setup Wizard
npx zero
Manual
Alternatively, you can selectively install the configurations you need.
ESLint
cat > .eslintrc.json << EOF
{
"extends": ["./node_modules/@adhamu/zero/eslint"]
}
EOF
Prettier
cat > .prettierrc.yaml << EOF
"@adhamu/zero/prettier"
EOF
If you would like to override any Prettier settings, you can instead use a Javascript file:
cat > .prettierrc.js << EOF
module.exports = {
...require('@adhamu/zero/prettier'),
semi: true,
}
EOF
Stylelint
cat > .stylelintrc.json << EOF
{
"extends": ["./node_modules/@adhamu/zero/stylelint"]
}
EOF
TSConfig
cat > tsconfig.json << EOF
{
"extends": "@adhamu/zero/tsconfig/base.json",
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "./dist"
}
}
EOF
Jest
cat > jest.config.js << EOF
module.exports = {
...require('@adhamu/zero/jest'),
transform: { '^.+\\.ts(x)?$': 'ts-jest' },
}
EOF
Note: You will need to install your own transformer. Eg. ts-jest
, @swc/jest
etc.