Skip to content

Instantly share code, notes, and snippets.

@armenr
Last active January 19, 2024 10:28
Show Gist options
  • Save armenr/a60c4d68e0cffa6318835e7574e36a93 to your computer and use it in GitHub Desktop.
Save armenr/a60c4d68e0cffa6318835e7574e36a93 to your computer and use it in GitHub Desktop.
antfu-eslintconfig + oxlint?
import antfu from '@antfu/eslint-config'
import { FlatCompat } from '@eslint/eslintrc'
// see here: https://github.com/oxc-project/eslint-plugin-oxlint
import oxlint from "eslint-plugin-oxlint"
const compat = new FlatCompat()
export default antfu({
typescript: {
tsconfigPath: 'tsconfig.json',
},
formatters: true,
ignores: [
'_mobile-*',
'.nuxt',
'*.Dockerfile',
'*.jpg',
'*.sh',
'*.svg',
'**/.stash/**',
'**/*.Dockerfile',
'**/*.sh',
'**/pnpm-lock.yaml',
'dist',
'util',
'util/*',
'util/scripts/*',
'**/node_modules/**',
// BEGIN AMPLIFY THINGS
'API.ts',
'graphql',
'models',
'amplify/backend/function/AdminQueries**',
'amplify-gradle-config.json',
'amplify/#current-cloud-backend',
'amplify/backend/.temp',
'amplify/**/build',
'amplify/backend/function/**/src/**/*.js',
'amplify/backend/function/**/src/index.js',
'amplify/backend/**/node_modules',
'amplify/backend/function/**/src/package-lock.json',
'amplify/logs',
'amplify/mock-api-resources',
'amplify/mock-data',
'amplifyconfiguration.dart',
'amplifytools.xcconfig',
'amplify-build-config.json',
'amplify/.config',
'amplify/.config/local-*',
'amplify/**/*-awscloudformation-template.json',
'amplify/**/*-cloudformation-template.json',
'amplify/**/*-parameters.json',
'amplify/**/amplify.state',
'amplify/**/transform.conf.json',
'amplify/backend/amplify-meta.json',
'amplify/backend/awscloudformation',
'amplifyconfiguration.json',
'aws-exports.js',
'awsconfiguration.json',
// END AMPLIFY THINGS
],
includes: [
'**/*.graphql',
'**/*.json',
'**/*.ts',
'**/*.vue',
'**/*.yaml',
'**/*.yml',
],
},
{
rules: {
'node/prefer-global/process': 'off',
},
}, ...compat.config({
extends: ['plugin:tailwindcss/recommended'],
rules: {
'tailwindcss/classnames-order': 'off',
'tailwindcss/no-contradicting-classname': 'warn',
'tailwindcss/enforces-negative-arbitrary-values': 'warn',
'tailwindcss/no-custom-classname': [
'error',
{
whitelist: [
'hs\\-.+',
'text\\-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl|\[.+\])',
'-top-\\[--user-nav-header-h\\]',
'typing-indicator',
'long-pressing',
],
},
],
},
}),
oxlint,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment