mirror of
https://github.com/outline/outline.git
synced 2026-06-13 19:35:02 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 354544a5da | |||
| cb3f3b4d94 | |||
| 78d8a441d5 | |||
| 1eebcb353d |
@@ -0,0 +1,107 @@
|
||||
import { FlatCompat } from '@eslint/eslintrc';
|
||||
import js from '@eslint/js';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
});
|
||||
|
||||
export default [
|
||||
...compat.extends(
|
||||
'eslint:recommended',
|
||||
'plugin:import/errors',
|
||||
'plugin:import/warnings',
|
||||
'plugin:import/typescript',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:jsx-a11y/recommended',
|
||||
'plugin:prettier/recommended'
|
||||
),
|
||||
...compat.config({
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint', 'eslint-plugin-import', 'lodash'],
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
'import/resolver': {
|
||||
typescript: {
|
||||
alwaysTryTypes: true,
|
||||
},
|
||||
node: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-console': 'error',
|
||||
'prefer-const': 'error',
|
||||
'react/prop-types': 'off',
|
||||
'react/jsx-no-target-blank': 'off',
|
||||
'react/self-closing-comp': 'error',
|
||||
'react/jsx-curly-brace-presence': [
|
||||
'error',
|
||||
{ props: 'never', children: 'never' },
|
||||
],
|
||||
'lodash/import-scope': [2, 'method'],
|
||||
'import/order': [
|
||||
'error',
|
||||
{
|
||||
'newlines-between': 'always',
|
||||
groups: [
|
||||
'builtin',
|
||||
'external',
|
||||
'internal',
|
||||
'parent',
|
||||
'sibling',
|
||||
'index',
|
||||
],
|
||||
pathGroups: [
|
||||
{
|
||||
pattern: 'styled-components',
|
||||
group: 'external',
|
||||
position: 'before',
|
||||
},
|
||||
{
|
||||
pattern: '{~/,~/**}',
|
||||
group: 'internal',
|
||||
position: 'after',
|
||||
},
|
||||
],
|
||||
pathGroupsExcludedImportTypes: ['builtin'],
|
||||
alphabetize: {
|
||||
order: 'asc',
|
||||
caseInsensitive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
{
|
||||
ignores: [
|
||||
'build/**',
|
||||
'coverage/**',
|
||||
'server/migrations/**',
|
||||
'server/migrations-test/**',
|
||||
'node_modules/**',
|
||||
'public/**',
|
||||
'server/test/support/fixtures/**',
|
||||
'server/test/scripts/**',
|
||||
'plugins/*/dist/**',
|
||||
'plugins/*/node_modules/**',
|
||||
'plugins/*/coverage/**',
|
||||
'plugins/*/build/**',
|
||||
'plugins/*/public/**',
|
||||
'plugins/*/migrations/**',
|
||||
'plugins/*/migrations-test/**',
|
||||
'plugins/*/test/support/fixtures/**',
|
||||
'plugins/*/test/scripts/**',
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
+13
-10
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"name": "outline",
|
||||
"type": "module",
|
||||
"description": "Open source wiki and knowledge base for growing teams",
|
||||
"private": true,
|
||||
"license": "Business Source License 1.1",
|
||||
"main": "index.js",
|
||||
@@ -38,7 +40,7 @@
|
||||
"url": "https://github.com/sponsors/outline"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18 <=20"
|
||||
"node": ">= 18 <=22"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -331,8 +333,9 @@
|
||||
"@types/utf8": "^3.0.3",
|
||||
"@types/validator": "^13.15.0",
|
||||
"@types/yauzl": "^2.10.3",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
||||
"@typescript-eslint/parser": "^8.32.0",
|
||||
"@babel/eslint-parser": "^7.27.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^29.7.0",
|
||||
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
||||
@@ -341,17 +344,17 @@
|
||||
"browserslist-to-esbuild": "^1.2.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"discord-api-types": "^0.37.119",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^8.10.0",
|
||||
"eslint-import-resolver-typescript": "^3.8.0",
|
||||
"eslint": "^9.26.0",
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-import-resolver-typescript": "^4.3.4",
|
||||
"eslint-plugin-es": "^4.1.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-lodash": "^7.4.0",
|
||||
"eslint-plugin-lodash": "^8.0.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.37.3",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-prettier": "^5.4.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"husky": "^8.0.3",
|
||||
"i18next-parser": "^8.13.0",
|
||||
"jest-cli": "^29.7.0",
|
||||
|
||||
Reference in New Issue
Block a user