diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..c5337b8b6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +quote_type = single \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index b6a72e7c8..000000000 --- a/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - "no-case-declarations":"off", - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-non-null-assertion":"off" - } - } \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..f9ad98125 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + root: true, + parserOptions: { + sourceType: 'module', + project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'], + tsconfigRootDir: __dirname, + }, + plugins: ['@typescript-eslint'], + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], + rules: { + 'no-case-declarations': 'off', + '@typescript-eslint/no-namespace': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + }, +}; diff --git a/.gitignore b/.gitignore index 879475d92..630de0f07 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ typedocs/ .build storybook-static/ .rollup.cache/ -test-report.xml \ No newline at end of file +test-report.xml +*.code-workspace diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 9df055de9..9e9271d02 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,7 +3,12 @@ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp // List of extensions which should be recommended for users of this workspace. - "recommendations": ["esbenp.prettier-vscode", "redhat.vscode-yaml"], + "recommendations": [ + "esbenp.prettier-vscode", + "redhat.vscode-yaml", + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig" + ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] } diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 000000000..4343d501d --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "types": ["@types/node"], + "noEmit": true, + "allowJs": true + }, + "extends": "./module-build/tsconfig.esm.json", + "include": ["tests/**/*.ts", "tools/**/*.ts", ".eslintrc.js"] +}