mirror of
https://github.com/run-llama/chat-ui.git
synced 2026-06-30 21:27:55 -04:00
config: prettier & eslint
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"trailingComma": "es5",
|
||||
"printWidth": 80,
|
||||
"bracketSpacing": true,
|
||||
"arrowParens": "avoid",
|
||||
"endOfLine": "lf",
|
||||
"plugins": ["prettier-plugin-tailwindcss"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
const { resolve } = require("node:path");
|
||||
const { resolve } = require('node:path')
|
||||
|
||||
const project = resolve(process.cwd(), "tsconfig.json");
|
||||
const project = resolve(process.cwd(), 'tsconfig.json')
|
||||
|
||||
/*
|
||||
* This is a custom ESLint configuration for use with
|
||||
@@ -14,13 +14,13 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
||||
module.exports = {
|
||||
extends: [
|
||||
...[
|
||||
"@vercel/style-guide/eslint/node",
|
||||
"@vercel/style-guide/eslint/typescript",
|
||||
"@vercel/style-guide/eslint/browser",
|
||||
"@vercel/style-guide/eslint/react",
|
||||
"@vercel/style-guide/eslint/next",
|
||||
'@vercel/style-guide/eslint/node',
|
||||
'@vercel/style-guide/eslint/typescript',
|
||||
'@vercel/style-guide/eslint/browser',
|
||||
'@vercel/style-guide/eslint/react',
|
||||
'@vercel/style-guide/eslint/next',
|
||||
].map(require.resolve),
|
||||
"turbo",
|
||||
'turbo',
|
||||
],
|
||||
parserOptions: {
|
||||
project,
|
||||
@@ -30,18 +30,20 @@ module.exports = {
|
||||
JSX: true,
|
||||
},
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
'import/resolver': {
|
||||
typescript: {
|
||||
project,
|
||||
},
|
||||
node: {
|
||||
extensions: [".mjs", ".js", ".jsx", ".ts", ".tsx"],
|
||||
extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
},
|
||||
},
|
||||
ignorePatterns: ["node_modules/", "dist/"],
|
||||
ignorePatterns: ['node_modules/', 'dist/'],
|
||||
// add rules configurations here
|
||||
rules: {
|
||||
"import/no-default-export": "off",
|
||||
'import/no-default-export': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'react/function-component-definition': 'off',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Vendored
+16
-11
@@ -1,6 +1,6 @@
|
||||
const { resolve } = require("node:path");
|
||||
const { resolve } = require('node:path')
|
||||
|
||||
const project = resolve(process.cwd(), "tsconfig.json");
|
||||
const project = resolve(process.cwd(), 'tsconfig.json')
|
||||
|
||||
/*
|
||||
* This is a custom ESLint configuration for use a library
|
||||
@@ -13,9 +13,9 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
"@vercel/style-guide/eslint/browser",
|
||||
"@vercel/style-guide/eslint/typescript",
|
||||
"@vercel/style-guide/eslint/react",
|
||||
'@vercel/style-guide/eslint/browser',
|
||||
'@vercel/style-guide/eslint/typescript',
|
||||
'@vercel/style-guide/eslint/react',
|
||||
].map(require.resolve),
|
||||
parserOptions: {
|
||||
project,
|
||||
@@ -24,26 +24,31 @@ module.exports = {
|
||||
JSX: true,
|
||||
},
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
'import/resolver': {
|
||||
typescript: {
|
||||
project,
|
||||
},
|
||||
node: {
|
||||
extensions: [".mjs", ".js", ".jsx", ".ts", ".tsx"],
|
||||
extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
},
|
||||
},
|
||||
ignorePatterns: ["node_modules/", "dist/", ".eslintrc.js", "**/*.css"],
|
||||
ignorePatterns: ['node_modules/', 'dist/', '.eslintrc.js', '**/*.css'],
|
||||
// add rules configurations here
|
||||
rules: {
|
||||
"import/no-default-export": "off",
|
||||
'import/no-default-export': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'react/function-component-definition': 'off',
|
||||
'react/jsx-sort-props': 'off',
|
||||
'import/order': 'off',
|
||||
'@typescript-eslint/no-empty-interface': 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.config.js"],
|
||||
files: ['*.config.js'],
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user