facile.it ESLint & Prettier extensible configuration
npm install -D eslint-config-facile eslint prettierNote eslint, prettier, typescript are a peer dependencies
create .prettierrc.js
module.exports = require('eslint-config-facile/prettierrc.json')create eslint.config.mjs
import { defineConfig } from 'eslint/config'
import react from 'eslint-config-facile/react'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
export default defineConfig([
react,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname, // or only import.meta.dirname, available after Node.js v20.11.0
},
},
},
])create eslint.config.mjs
import { defineConfig } from 'eslint/config'
import next from 'eslint-config-facile/next'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
export default defineConfig([
next,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname, // or only import.meta.dirname, available after Node.js v20.11.0
},
},
},
])create eslint.config.mjs
import { defineConfig } from 'eslint/config'
import node from 'eslint-config-facile/node'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
export default defineConfig([
node,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname, // or only import.meta.dirname, available after Node.js v20.11.0
},
},
},
])