mirror of
https://github.com/enso-org/enso.git
synced 2024-12-02 01:23:15 +03:00
5995a00958
part of #7954 # Important Notes The workflow is: - `$ npm install` -- just in case - `$ npm --workspace=enso-gui2 run build-ydoc-server-polyglot` -- build the `ydocServer.js` bundle - `$ sbt ydoc-server/assembly` -- build the ydoc server jar - `env POLYGLOT_YDOC_SERVER=true npm --workspace=enso-gui2 run dev` -- run the dev server with the polyglot ydoc server. Providing `POLYGLOT_YDOC_SERVER_DEBUG=true` env variable enables the chrome debugger
76 lines
1.9 KiB
JavaScript
76 lines
1.9 KiB
JavaScript
import { FlatCompat } from '@eslint/eslintrc'
|
|
import eslintJs from '@eslint/js'
|
|
import * as path from 'node:path'
|
|
import * as url from 'node:url'
|
|
|
|
const compat = new FlatCompat()
|
|
|
|
const DIR_NAME = path.dirname(url.fileURLToPath(import.meta.url))
|
|
|
|
const conf = [
|
|
{
|
|
ignores: [
|
|
'rust-ffi/pkg',
|
|
'rust-ffi/node-pkg',
|
|
'dist',
|
|
'shared/ast/generated',
|
|
'templates',
|
|
'.histoire',
|
|
'playwright-report',
|
|
'test-results',
|
|
'vite.ydoc-server-polyglot.config.ts',
|
|
],
|
|
},
|
|
...compat.extends('plugin:vue/vue3-recommended'),
|
|
eslintJs.configs.recommended,
|
|
...compat.extends('@vue/eslint-config-typescript', '@vue/eslint-config-prettier'),
|
|
{
|
|
// files: ['{**,src}/*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
tsconfigRootDir: DIR_NAME,
|
|
ecmaVersion: 'latest',
|
|
project: [
|
|
'./tsconfig.app.json',
|
|
'./tsconfig.node.json',
|
|
'./tsconfig.server.json',
|
|
'./tsconfig.app.vitest.json',
|
|
'./tsconfig.server.vitest.json',
|
|
'./tsconfig.story.json',
|
|
],
|
|
},
|
|
},
|
|
rules: {
|
|
camelcase: [1, { ignoreImports: true }],
|
|
'no-inner-declarations': 0,
|
|
'vue/attribute-hyphenation': [2, 'never'],
|
|
'vue/v-on-event-hyphenation': [2, 'never'],
|
|
'@typescript-eslint/no-unused-vars': [
|
|
1,
|
|
{
|
|
varsIgnorePattern: '^_',
|
|
argsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: ['stories/*.vue'],
|
|
rules: {
|
|
'vue/multi-word-component-names': 0,
|
|
},
|
|
},
|
|
// We must make sure our E2E tests await all steps, otherwise they're flaky.
|
|
{
|
|
files: ['e2e/**/*.spec.ts'],
|
|
languageOptions: {
|
|
parser: await import('@typescript-eslint/parser'),
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-floating-promises': 2,
|
|
},
|
|
},
|
|
]
|
|
|
|
export default conf
|