diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 323434974c..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,70 +0,0 @@ -.eslintrc.js -.cache-loader -.DS_Store -.pnpm-debug.log -.turbo -.vscode/generated* -/_work -/actions-runner -node_modules -patches -pnpm-lock.yaml -.github/actions/issue-validator/index.mjs -*.cjs -*.js -*.d.ts -*.d.ts.map - -.svelte-kit -.next -.nuxt - -# --------------- Docs --------------- - -.docusaurus -build -docs/docs/reference/core -docs/docs/reference/sveltekit -static - -# --------------- Packages --------------- - -coverage -dist - -# @auth/core -packages/core/src/providers/oauth-types.ts -packages/core/src/lib/pages/styles.ts - -# @auth/sveltekit -packages/frameworks-sveltekit/package -packages/frameworks-sveltekit/vite.config.{js,ts}.timestamp-* - -# next-auth -packages/next-auth/src/providers/oauth-types.ts -packages/next-auth/css/index.css - - -# Adapters -.branches -db.sqlite -dev.db -dynamodblocal-bin -firebase-debug.log -firestore-debug.log -migrations -test.schema.gql - -# --------------- Apps --------------- - - -# Examples should have their own Prettier config since they are templates too -apps/example-sveltekit - -# Development app -apps - - -# --------------- Tests --------------- -# TODO: these should be linted -packages/**/*test* \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 802d0ab7f0..0000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,75 +0,0 @@ -// @ts-check - -/** @type {import("eslint").ESLint.ConfigData} */ -module.exports = { - env: { browser: true, es2022: true, node: true }, - extends: ["eslint:recommended", "prettier"], - overrides: [ - { - files: ["*.ts", "*.tsx"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: ["./packages/**/tsconfig.json", "./apps/**/tsconfig.json"], - }, - settings: { react: { version: "18" } }, - extends: [ - "plugin:react/recommended", - "plugin:react/jsx-runtime", - "standard-with-typescript", - "prettier", - ], - rules: { - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/method-signature-style": "off", - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/restrict-template-expressions": "off", - "@typescript-eslint/strict-boolean-expressions": "off", - "react/prop-types": "off", - "react/no-unescaped-entities": "off", - }, - }, - { - files: ["*.test.ts", "*.test.js"], - extends: ["plugin:jest/recommended"], - env: { jest: true }, - }, - { - files: ["docs/**"], - plugins: ["@docusaurus"], - extends: ["plugin:@docusaurus/recommended"], - }, - { - // TODO: Expand to all packages - files: ["packages/{core,sveltekit}/*.ts"], - plugins: ["jsdoc"], - extends: ["plugin:jsdoc/recommended"], - rules: { - "jsdoc/require-param": "off", - "jsdoc/require-returns": "off", - "jsdoc/require-jsdoc": [ - "warn", - { publicOnly: true, enableFixer: false }, - ], - "jsdoc/no-multi-asterisks": ["warn", { allowWhitespace: true }], - "jsdoc/tag-lines": "off", - }, - }, - { - files: ["packages/frameworks-sveltekit"], - plugins: ["svelte3"], - overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }], - settings: { - "svelte3/typescript": () => require("typescript"), - }, - parserOptions: { sourceType: "module", ecmaVersion: 2020 }, - env: { browser: true, es2017: true, node: true }, - }, - ], - parserOptions: { - sourceType: "module", - ecmaVersion: "latest", - ecmaFeatures: { jsx: true }, - }, - root: true, -} diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index fc17898f60..0000000000 --- a/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// @ts-check - -/** @type {import("prettier").Config} */ -module.exports = { - semi: false, - singleQuote: false, - overrides: [ - { - files: [ - "apps/dev/nextjs/pages/api/auth/[...nextauth].ts", - "docs/{sidebars,docusaurus.config}.js", - ], - options: { printWidth: 150 }, - }, - { - files: ["**/*package.json"], - options: { - trailingComma: "none", - }, - }, - ], -} diff --git a/package.json b/package.json index 6e075dd7db..ccabec1f4a 100644 --- a/package.json +++ b/package.json @@ -61,5 +61,144 @@ "patchedDependencies": { "@balazsorban/monorepo-release@0.1.8": "patches/@balazsorban__monorepo-release@0.1.8.patch" } + }, + "eslintIgnore": [ + ".eslintrc.js", + ".cache-loader", + ".DS_Store", + ".pnpm-debug.log", + ".turbo", + ".vscode/generated*", + "/_work", + "/actions-runner", + "node_modules", + "patches", + "pnpm-lock.yaml", + ".github/actions/issue-validator/index.mjs", + "*.cjs", + "*.js", + "*.d.ts", + "*.d.ts.map", + ".svelte-kit", + ".next", + ".nuxt", + ".docusaurus", + "build", + "docs/docs/reference/core", + "docs/docs/reference/sveltekit", + "static", + "coverage", + "dist", + "packages/core/src/providers/oauth-types.ts", + "packages/core/src/lib/pages/styles.ts", + "packages/frameworks-sveltekit/package", + "packages/frameworks-sveltekit/vite.config.{js,ts}.timestamp-*", + "packages/next-auth/src/providers/oauth-types.ts", + "packages/next-auth/css/index.css", + ".branches", + "db.sqlite", + "dev.db", + "dynamodblocal-bin", + "firebase-debug.log", + "firestore-debug.log", + "migrations", + "test.schema.gql", + "apps/example-sveltekit", + "apps", + "packages/**/*test*" + ], + "eslintConfig": { + "env": { + "browser": true, + "es2021": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "prettier" + ], + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": ["./packages/**/tsconfig.json", "./apps/**/tsconfig.json"] + }, + "settings": { "react": { "version": "18" } }, + "extends": [ + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "standard-with-typescript", + "prettier" + ], + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/method-signature-style": "off", + "@typescript-eslint/naming-convention": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/restrict-template-expressions": "off", + "@typescript-eslint/strict-boolean-expressions": "off", + "react/prop-types": "off", + "react/no-unescaped-entities": "off" + } + }, + { + "files": ["*.test.ts", "*.test.js"], + "extends": ["plugin:jest/recommended"], + "env": { "jest": true } + }, + { + "files": ["docs/**"], + "plugins": ["@docusaurus"], + "extends": ["plugin:@docusaurus/recommended"] + }, + { + "files": ["packages/{core,sveltekit}/*.ts"], + "plugins": ["jsdoc"], + "extends": ["plugin:jsdoc/recommended"], + "rules": { + "jsdoc/require-param": "off", + "jsdoc/require-returns": "off", + "jsdoc/require-jsdoc": [ + "warn", + { "publicOnly": true, "enableFixer": false } + ], + "jsdoc/no-multi-asterisks": ["warn", { "allowWhitespace": true }], + "jsdoc/tag-lines": "off" + } + }, + { + "files": ["packages/frameworks-sveltekit"], + "plugins": ["svelte3"], + "overrides": [{ "files": ["*.svelte"], "processor": "svelte3/svelte3" }], + "parserOptions": { "sourceType": "module", "ecmaVersion": 2020 }, + "env": { "browser": true, "es2017": true, "node": true } + } + ], + "parserOptions": { + "sourceType": "module", + "ecmaVersion": "latest", + "ecmaFeatures": { "jsx": true } + }, + "root": true + }, + "prettier": { + "semi": false, + "singleQuote": false, + "overrides": [ + { + "files": [ + "apps/dev/nextjs/pages/api/auth/[...nextauth].ts", + "docs/{sidebars,docusaurus.config}.js" + ], + "options": { "printWidth": 150 } + }, + { + "files": ["**/*package.json"], + "options": { + "trailingComma": "none" + } + } + ] } }