mirror of
https://github.com/twentyhq/twenty
synced 2026-04-21 21:47:38 +00:00
Quick proof of concept for twenty-apps + twenty-cli, with local development / hot reload Let's discuss it! https://github.com/user-attachments/assets/c6789936-cd5f-4110-a265-863a6ac1af2d
111 lines
3.1 KiB
JavaScript
111 lines
3.1 KiB
JavaScript
import js from '@eslint/js';
|
|
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
import typescriptParser from '@typescript-eslint/parser';
|
|
import prettierPlugin from 'eslint-plugin-prettier';
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
languageOptions: {
|
|
parser: typescriptParser,
|
|
parserOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
},
|
|
globals: {
|
|
// Node.js globals
|
|
process: 'readonly',
|
|
console: 'readonly',
|
|
Buffer: 'readonly',
|
|
__dirname: 'readonly',
|
|
__filename: 'readonly',
|
|
global: 'readonly',
|
|
setTimeout: 'readonly',
|
|
clearTimeout: 'readonly',
|
|
setInterval: 'readonly',
|
|
clearInterval: 'readonly',
|
|
// Browser globals that Node.js also has
|
|
URL: 'readonly',
|
|
URLSearchParams: 'readonly',
|
|
// Node.js types
|
|
NodeJS: 'readonly',
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': typescriptEslint,
|
|
prettier: prettierPlugin,
|
|
},
|
|
rules: {
|
|
...typescriptEslint.configs.recommended.rules,
|
|
'prettier/prettier': 'error',
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'no-useless-escape': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.js'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
process: 'readonly',
|
|
console: 'readonly',
|
|
Buffer: 'readonly',
|
|
__dirname: 'readonly',
|
|
__filename: 'readonly',
|
|
global: 'readonly',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.test.ts', '**/*.spec.ts', '**/__tests__/**/*.ts'],
|
|
languageOptions: {
|
|
parser: typescriptParser,
|
|
parserOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
},
|
|
globals: {
|
|
// Node.js globals
|
|
process: 'readonly',
|
|
console: 'readonly',
|
|
Buffer: 'readonly',
|
|
__dirname: 'readonly',
|
|
__filename: 'readonly',
|
|
global: 'readonly',
|
|
// Jest globals
|
|
describe: 'readonly',
|
|
it: 'readonly',
|
|
test: 'readonly',
|
|
expect: 'readonly',
|
|
jest: 'readonly',
|
|
beforeEach: 'readonly',
|
|
afterEach: 'readonly',
|
|
beforeAll: 'readonly',
|
|
afterAll: 'readonly',
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': typescriptEslint,
|
|
prettier: prettierPlugin,
|
|
},
|
|
rules: {
|
|
...typescriptEslint.configs.recommended.rules,
|
|
'prettier/prettier': 'error',
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'no-useless-escape': 'off',
|
|
},
|
|
},
|
|
{
|
|
ignores: ['dist/**', 'node_modules/**'],
|
|
},
|
|
];
|