the lintness
This commit is contained in:
parent
1a6ced0373
commit
2c72972097
|
@ -2,19 +2,21 @@
|
||||||
|
|
||||||
This package can be used to incorporate a very simple `import` system into Squiggle.
|
This package can be used to incorporate a very simple `import` system into Squiggle.
|
||||||
|
|
||||||
To use, write special files with a ``.squiggleU`` file type. In these files, you can write lines like,
|
To use, write special files with a `.squiggleU` file type. In these files, you can write lines like,
|
||||||
|
|
||||||
```
|
```
|
||||||
@import(models/gdp_over_time.squiggle, gdpOverTime)
|
@import(models/gdp_over_time.squiggle, gdpOverTime)
|
||||||
gdpOverTime(2.5)
|
gdpOverTime(2.5)
|
||||||
```
|
```
|
||||||
|
|
||||||
The imports will be replaced with the contents of the file in `models/gdp_over_time.squiggle` upon compilation. The ``.squiggleU`` file will be converted into a ``.squiggle`` file with the ``import`` statement having this replacement.
|
The imports will be replaced with the contents of the file in `models/gdp_over_time.squiggle` upon compilation. The `.squiggleU` file will be converted into a `.squiggle` file with the `import` statement having this replacement.
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
### `npx squiggle-cli-experimental compile`
|
### `npx squiggle-cli-experimental compile`
|
||||||
|
|
||||||
Runs compilation in the current directory and all of its subdirectories.
|
Runs compilation in the current directory and all of its subdirectories.
|
||||||
|
|
||||||
### `npx squiggle-cli-experimental watch`
|
### `npx squiggle-cli-experimental watch`
|
||||||
Watches ``.squiggleU`` files in the current directory (and subdirectories) and rebuilds them when they are saved. Note that this will *not* rebuild files when their dependencies are changed, just when they are changed directly.
|
|
||||||
|
Watches `.squiggleU` files in the current directory (and subdirectories) and rebuilds them when they are saved. Note that this will _not_ rebuild files when their dependencies are changed, just when they are changed directly.
|
||||||
|
|
|
@ -19,4 +19,3 @@
|
||||||
"indent-string": "^5.0.0"
|
"indent-string": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,23 @@ This file contains:
|
||||||
-webkit-text-size-adjust: 100%; /* 2 */
|
-webkit-text-size-adjust: 100%; /* 2 */
|
||||||
-moz-tab-size: 4; /* 3 */
|
-moz-tab-size: 4; /* 3 */
|
||||||
tab-size: 4; /* 3 */
|
tab-size: 4; /* 3 */
|
||||||
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
|
font-family: theme(
|
||||||
|
"fontFamily.sans",
|
||||||
|
ui-sans-serif,
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
Roboto,
|
||||||
|
"Helvetica Neue",
|
||||||
|
Arial,
|
||||||
|
"Noto Sans",
|
||||||
|
sans-serif,
|
||||||
|
"Apple Color Emoji",
|
||||||
|
"Segoe UI Emoji",
|
||||||
|
"Segoe UI Symbol",
|
||||||
|
"Noto Color Emoji"
|
||||||
|
); /* 4 */
|
||||||
/* } */
|
/* } */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -32,7 +48,6 @@ This file contains:
|
||||||
line-height: inherit; /* 2 */
|
line-height: inherit; /* 2 */
|
||||||
/* } */
|
/* } */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
||||||
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
||||||
|
@ -44,12 +59,12 @@ This file contains:
|
||||||
box-sizing: border-box; /* 1 */
|
box-sizing: border-box; /* 1 */
|
||||||
border-width: 0; /* 2 */
|
border-width: 0; /* 2 */
|
||||||
border-style: solid; /* 2 */
|
border-style: solid; /* 2 */
|
||||||
border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */
|
border-color: theme("borderColor.DEFAULT", currentColor); /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
::before,
|
::before,
|
||||||
::after {
|
::after {
|
||||||
--tw-content: '';
|
--tw-content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -113,7 +128,17 @@ code,
|
||||||
kbd,
|
kbd,
|
||||||
samp,
|
samp,
|
||||||
pre {
|
pre {
|
||||||
font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
|
font-family: theme(
|
||||||
|
"fontFamily.mono",
|
||||||
|
ui-monospace,
|
||||||
|
SFMono-Regular,
|
||||||
|
Menlo,
|
||||||
|
Monaco,
|
||||||
|
Consolas,
|
||||||
|
"Liberation Mono",
|
||||||
|
"Courier New",
|
||||||
|
monospace
|
||||||
|
); /* 1 */
|
||||||
font-size: 1em; /* 2 */
|
font-size: 1em; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,9 +217,9 @@ select {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
button,
|
button,
|
||||||
[type='button'],
|
[type="button"],
|
||||||
[type='reset'],
|
[type="reset"],
|
||||||
[type='submit'] {
|
[type="submit"] {
|
||||||
-webkit-appearance: button; /* 1 */
|
-webkit-appearance: button; /* 1 */
|
||||||
background-color: transparent; /* 2 */
|
background-color: transparent; /* 2 */
|
||||||
background-image: none; /* 2 */
|
background-image: none; /* 2 */
|
||||||
|
@ -238,7 +263,7 @@ Correct the cursor style of increment and decrement buttons in Safari.
|
||||||
2. Correct the outline style in Safari.
|
2. Correct the outline style in Safari.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[type='search'] {
|
[type="search"] {
|
||||||
-webkit-appearance: textfield; /* 1 */
|
-webkit-appearance: textfield; /* 1 */
|
||||||
outline-offset: -2px; /* 2 */
|
outline-offset: -2px; /* 2 */
|
||||||
}
|
}
|
||||||
|
@ -322,7 +347,7 @@ textarea {
|
||||||
input::placeholder,
|
input::placeholder,
|
||||||
textarea::placeholder {
|
textarea::placeholder {
|
||||||
opacity: 1; /* 1 */
|
opacity: 1; /* 1 */
|
||||||
color: theme('colors.gray.400', #9ca3af); /* 2 */
|
color: theme("colors.gray.400", #9ca3af); /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
/* Fork of https://github.com/tailwindlabs/tailwindcss-forms styles, see the comment in main.css for details. */
|
/* Fork of https://github.com/tailwindlabs/tailwindcss-forms styles, see the comment in main.css for details. */
|
||||||
.squiggle {
|
.squiggle {
|
||||||
.form-input,.form-textarea,.form-select,.form-multiselect {
|
.form-input,
|
||||||
|
.form-textarea,
|
||||||
|
.form-select,
|
||||||
|
.form-multiselect {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-color: #6b7280;
|
border-color: #6b7280;
|
||||||
|
@ -14,19 +17,26 @@ font-size: 1rem;
|
||||||
line-height: 1.5rem;
|
line-height: 1.5rem;
|
||||||
--tw-shadow: 0 0 #0000;
|
--tw-shadow: 0 0 #0000;
|
||||||
}
|
}
|
||||||
.form-input:focus, .form-textarea:focus, .form-select:focus, .form-multiselect:focus {
|
.form-input:focus,
|
||||||
|
.form-textarea:focus,
|
||||||
|
.form-select:focus,
|
||||||
|
.form-multiselect:focus {
|
||||||
outline: 2px solid transparent;
|
outline: 2px solid transparent;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
|
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
|
||||||
--tw-ring-offset-width: 0px;
|
--tw-ring-offset-width: 0px;
|
||||||
--tw-ring-offset-color: #fff;
|
--tw-ring-offset-color: #fff;
|
||||||
--tw-ring-color: #2563eb;
|
--tw-ring-color: #2563eb;
|
||||||
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
|
||||||
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
||||||
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0
|
||||||
|
calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
||||||
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
|
||||||
|
var(--tw-shadow);
|
||||||
border-color: #2563eb;
|
border-color: #2563eb;
|
||||||
}
|
}
|
||||||
.form-input::placeholder,.form-textarea::placeholder {
|
.form-input::placeholder,
|
||||||
|
.form-textarea::placeholder {
|
||||||
color: #6b7280;
|
color: #6b7280;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -36,11 +46,20 @@ padding: 0;
|
||||||
.form-input::-webkit-date-and-time-value {
|
.form-input::-webkit-date-and-time-value {
|
||||||
min-height: 1.5em;
|
min-height: 1.5em;
|
||||||
}
|
}
|
||||||
.form-input::-webkit-datetime-edit,.form-input::-webkit-datetime-edit-year-field,.form-input::-webkit-datetime-edit-month-field,.form-input::-webkit-datetime-edit-day-field,.form-input::-webkit-datetime-edit-hour-field,.form-input::-webkit-datetime-edit-minute-field,.form-input::-webkit-datetime-edit-second-field,.form-input::-webkit-datetime-edit-millisecond-field,.form-input::-webkit-datetime-edit-meridiem-field {
|
.form-input::-webkit-datetime-edit,
|
||||||
|
.form-input::-webkit-datetime-edit-year-field,
|
||||||
|
.form-input::-webkit-datetime-edit-month-field,
|
||||||
|
.form-input::-webkit-datetime-edit-day-field,
|
||||||
|
.form-input::-webkit-datetime-edit-hour-field,
|
||||||
|
.form-input::-webkit-datetime-edit-minute-field,
|
||||||
|
.form-input::-webkit-datetime-edit-second-field,
|
||||||
|
.form-input::-webkit-datetime-edit-millisecond-field,
|
||||||
|
.form-input::-webkit-datetime-edit-meridiem-field {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
.form-checkbox,.form-radio {
|
.form-checkbox,
|
||||||
|
.form-radio {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
-webkit-print-color-adjust: exact;
|
-webkit-print-color-adjust: exact;
|
||||||
|
@ -62,18 +81,23 @@ border-width: 1px;
|
||||||
.form-checkbox {
|
.form-checkbox {
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.form-checkbox:focus,.form-radio:focus {
|
.form-checkbox:focus,
|
||||||
|
.form-radio:focus {
|
||||||
outline: 2px solid transparent;
|
outline: 2px solid transparent;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
|
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
|
||||||
--tw-ring-offset-width: 2px;
|
--tw-ring-offset-width: 2px;
|
||||||
--tw-ring-offset-color: #fff;
|
--tw-ring-offset-color: #fff;
|
||||||
--tw-ring-color: #2563eb;
|
--tw-ring-color: #2563eb;
|
||||||
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
|
||||||
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
||||||
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0
|
||||||
|
calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
||||||
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
|
||||||
|
var(--tw-shadow);
|
||||||
}
|
}
|
||||||
.form-checkbox:checked,.form-radio:checked {
|
.form-checkbox:checked,
|
||||||
|
.form-radio:checked {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
background-color: currentColor;
|
background-color: currentColor;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
@ -83,7 +107,10 @@ background-repeat: no-repeat;
|
||||||
.form-checkbox:checked {
|
.form-checkbox:checked {
|
||||||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
||||||
}
|
}
|
||||||
.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus {
|
.form-checkbox:checked:hover,
|
||||||
|
.form-checkbox:checked:focus,
|
||||||
|
.form-radio:checked:hover,
|
||||||
|
.form-radio:checked:focus {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
background-color: currentColor;
|
background-color: currentColor;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +122,8 @@ background-size: 100% 100%;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus {
|
.form-checkbox:indeterminate:hover,
|
||||||
|
.form-checkbox:indeterminate:focus {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
background-color: currentColor;
|
background-color: currentColor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
"ecmaVersion": 6,
|
"ecmaVersion": 6,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": ["@typescript-eslint"],
|
||||||
"@typescript-eslint"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/naming-convention": "warn",
|
"@typescript-eslint/naming-convention": "warn",
|
||||||
"@typescript-eslint/semi": "warn",
|
"@typescript-eslint/semi": "warn",
|
||||||
|
@ -16,9 +14,5 @@
|
||||||
"no-throw-literal": "warn",
|
"no-throw-literal": "warn",
|
||||||
"semi": "off"
|
"semi": "off"
|
||||||
},
|
},
|
||||||
"ignorePatterns": [
|
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
|
||||||
"out",
|
|
||||||
"dist",
|
|
||||||
"**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
4
packages/vscode-ext/.vscode/extensions.json
vendored
4
packages/vscode-ext/.vscode/extensions.json
vendored
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||||
// for the documentation about the extensions.json format
|
// for the documentation about the extensions.json format
|
||||||
"recommendations": [
|
"recommendations": ["dbaeumer.vscode-eslint"]
|
||||||
"dbaeumer.vscode-eslint"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
12
packages/vscode-ext/.vscode/launch.json
vendored
12
packages/vscode-ext/.vscode/launch.json
vendored
|
@ -9,12 +9,8 @@
|
||||||
"name": "Run Extension",
|
"name": "Run Extension",
|
||||||
"type": "extensionHost",
|
"type": "extensionHost",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"args": [
|
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
|
||||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
"outFiles": ["${workspaceFolder}/out/**/*.js"],
|
||||||
],
|
|
||||||
"outFiles": [
|
|
||||||
"${workspaceFolder}/out/**/*.js"
|
|
||||||
],
|
|
||||||
"preLaunchTask": "${defaultBuildTask}"
|
"preLaunchTask": "${defaultBuildTask}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -25,9 +21,7 @@
|
||||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||||
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
|
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
|
||||||
],
|
],
|
||||||
"outFiles": [
|
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
|
||||||
"${workspaceFolder}/out/test/**/*.js"
|
|
||||||
],
|
|
||||||
"preLaunchTask": "${defaultBuildTask}"
|
"preLaunchTask": "${defaultBuildTask}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,12 +3,10 @@
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "ES2020",
|
"target": "ES2020",
|
||||||
"outDir": "out",
|
"outDir": "out",
|
||||||
"lib": [
|
"lib": ["ES2020", "dom"],
|
||||||
"ES2020", "dom"
|
|
||||||
],
|
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"strict": true, /* enable all strict type-checking options */
|
"strict": true /* enable all strict type-checking options */
|
||||||
/* Additional Checks */
|
/* Additional Checks */
|
||||||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user