Linters

ESLint

pnpm add -D eslint typescript @antfu/eslint-config
cat > eslint.config.js << EOF
import antfu from '@antfu/eslint-config'

export default antfu({
  ignores: [
    '.github/*',
    '.vscode/*',
    'public/build/*',
    'public/vendor/*',
    'public/js/filament/*',
    'resources/**/*.d.ts',
    'storage/*',
    'vendor/*',
  ],
}, {
  rules: {
    'no-console': 'warn',
    'node/prefer-global/process': 'off',
    'vue/max-attributes-per-line': ['error', {
      singleline: 1,
    }],
  },
})
EOF
mkdir -p .vscode
cat > .vscode/settings.json << EOF
{
  "typescript.tsdk": "node_modules/typescript/lib",
  "eslint.experimental.useFlatConfig": true
}
EOF
package.json
{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}
pnpm lint:fix

editorconfig

echo "[*.{json,js,ts,vue,blade}]" >> .editorconfig
echo "indent_size = 2" >> .editorconfig
Table of Contents