Skip to content

Commit 9941008

Browse files
authored
Add ch-code-editor control (#286)
* Add ch-code-editor control A Web Component based on the Monaco editor. We use Vite to prebundle the Monaco's chunks to avoid issues with StencilJS' rollup configuration. * Add "type": "module" to compile JS to .js extension instead of .mjs This is required by Vite plugin * Update package-lock.json * Update showcase * Create readme.md * Update components.d.ts * Update .gitignore * Update .eslintrc.js * Add "vite build" in package.json scripts With this change, we ensure that the library will work with the Monaco editor by default * Add scripts for lighter builds These scripts are intended to be used after the creation of the Monaco editor chunks * Fix order * Improve types and bundle size * Fix initial value not working * Remove unused styles * Fix implementation of code diffing * Add missing Watch * Improve readme * Migrate ESLint to CJS and disable local plugin as a WA to re-enable ESLint * Remove console.log
1 parent 386bb17 commit 9941008

16 files changed

+7441
-81
lines changed

.eslintrc.js .eslintrc.cjs

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
3-
plugins: ["@typescript-eslint", "local"],
3+
plugins: ["@typescript-eslint"],
44
extends: [
55
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
66
"plugin:@stencil-community/recommended", // Enables @stencil-community/eslint-plugin.
@@ -11,7 +11,12 @@ module.exports = {
1111
project: "./tsconfig.json",
1212
sourceType: "module" // Allows for the use of imports
1313
},
14-
ignorePatterns: ["src/deprecated-components/*"],
14+
ignorePatterns: [
15+
"src/deprecated-components/*",
16+
"node_modules/*",
17+
"www/*",
18+
"dist/*"
19+
],
1520
rules: {
1621
// - - - - - - - - - - - -
1722
// ESLint
@@ -97,14 +102,14 @@ module.exports = {
97102

98103
// WA to fix false positive errors
99104
"@stencil-community/strict-mutable": "warn" // This rule catches Stencil Prop marked as mutable but not changing value in code
100-
},
101-
overrides: [
102-
{
103-
files: ["**/*.tsx"],
104-
rules: {
105-
"local/jsx-uses-my-pragma": "error", // These are needed to avoid getting a not used error with imports used in JSX
106-
"local/jsx-uses-vars": "error"
107-
}
108-
}
109-
]
105+
}
106+
// overrides: [
107+
// {
108+
// files: ["**/*.tsx"],
109+
// rules: {
110+
// "local/jsx-uses-my-pragma": "error", // These are needed to avoid getting a not used error with imports used in JSX
111+
// "local/jsx-uses-vars": "error"
112+
// }
113+
// }
114+
// ]
110115
};

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ build/Release
3131
# Dependency directories
3232
node_modules/
3333
jspm_packages/
34+
src/components/code-editor/monaco/output
3435

3536
# TypeScript v1 declaration files
3637
typings/

0 commit comments

Comments
 (0)