Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- plugins: ['unicorn'], // https://github.com/sindresorhus/eslint-plugin-unicorn
- overrides: [
- // TS/JS
- {
- files: ['src/**/*.ts', 'src/**/*.js'],
- rules: {
- 'unicorn/filename-case': [
- 'error',
- {
- cases: {
- camelCase: true,
- pascalCase: true,
- },
- },
- ],
- },
- },
- // Components/Layouts
- {
- files: ['src/**/*.tsx', 'src/**/*.jsx'],
- excludedFiles: ['src/pages/**/*.tsx', 'src/pages/**/*.jsx'],
- rules: {
- 'unicorn/filename-case': [
- 'error',
- {
- cases: {
- pascalCase: true,
- },
- },
- ],
- },
- },
- // Pages
- {
- files: ['src/pages/*.tsx', 'src/pages/*.jsx'],
- rules: {
- 'unicorn/filename-case': [
- 'error',
- {
- cases: {
- kebabCase: true,
- },
- },
- ],
- },
- },
- // React Hooks (use methods)
- {
- files: ['src/**/Use*.ts', 'src/**/use*.ts', 'src/**/Use*.js', 'src/**/use*.js'],
- rules: {
- 'unicorn/filename-case': [
- 'error',
- {
- cases: {
- camelCase: true,
- },
- },
- ],
- },
- },
- // Styles (css/scss/sass/less/stylus)
- {
- files: ['src/**/*.css', 'src/**/*.scss', 'src/**/*.sass', 'src/**/*.less', 'src/**/*.stylus'],
- rules: {
- 'unicorn/filename-case': [
- 'error',
- {
- cases: {
- kebabCase: true,
- },
- },
- ],
- },
- },
- // @types
- {
- files: ['@types/**/*.d.ts'],
- rules: {
- 'unicorn/filename-case': [
- 'error',
- {
- cases: {
- kebabCase: true,
- },
- },
- ],
- },
- },
- ],
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement