mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-14 14:53:20 +00:00
dprint.json seems to be OK, some forgotten functions
This commit is contained in:
parent
fc36b2e693
commit
bde2c50e3e
@ -6,3 +6,5 @@
|
||||
/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js
|
||||
/core/modules/utils/dom/csscolorparser.js
|
||||
/plugins/tiddlywiki/*/files/
|
||||
/tmp/
|
||||
/output/
|
||||
|
317
.eslintrc.json
Normal file
317
.eslintrc.json
Normal file
@ -0,0 +1,317 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"globals": {
|
||||
"$tw": "writable"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 5
|
||||
},
|
||||
"plugins": [],
|
||||
"rules": {
|
||||
"array-bracket-newline": "off",
|
||||
"array-bracket-spacing": "off",
|
||||
"array-callback-return": "off",
|
||||
"array-element-newline": "off",
|
||||
"arrow-body-style": "error",
|
||||
"arrow-parens": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"block-scoped-var": "off",
|
||||
"block-spacing": "off",
|
||||
"brace-style": "off",
|
||||
"callback-return": "off",
|
||||
"camelcase": "off",
|
||||
"capitalized-comments": "off",
|
||||
"class-methods-use-this": "error",
|
||||
"comma-dangle": "off",
|
||||
"comma-spacing": "off",
|
||||
"comma-style": "off",
|
||||
"complexity": "off",
|
||||
"computed-property-spacing": "off",
|
||||
"consistent-return": "off",
|
||||
"consistent-this": "off",
|
||||
"curly": "off",
|
||||
"default-case": "off",
|
||||
"default-case-last": "error",
|
||||
"default-param-last": "error",
|
||||
"dot-location": "off",
|
||||
"dot-notation": "off",
|
||||
"eol-last": "off",
|
||||
"eqeqeq": "off",
|
||||
"func-call-spacing": "off",
|
||||
"func-name-matching": "off",
|
||||
"func-names": "off",
|
||||
"func-style": "off",
|
||||
"function-call-argument-newline": "off",
|
||||
"function-paren-newline": "off",
|
||||
"generator-star-spacing": "error",
|
||||
"global-require": "off",
|
||||
"grouped-accessor-pairs": "error",
|
||||
"guard-for-in": "off",
|
||||
"handle-callback-err": "off",
|
||||
"id-blacklist": "error",
|
||||
"id-denylist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"implicit-arrow-linebreak": "error",
|
||||
"indent": "off",
|
||||
"indent-legacy": "off",
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "off",
|
||||
"keyword-spacing": [
|
||||
"error",
|
||||
{
|
||||
"before": true,
|
||||
"after": false,
|
||||
"overrides": {
|
||||
"case": {
|
||||
"after": true
|
||||
},
|
||||
"do": {
|
||||
"after": true
|
||||
},
|
||||
"else": {
|
||||
"after": true
|
||||
},
|
||||
"return": {
|
||||
"after": true
|
||||
},
|
||||
"throw": {
|
||||
"after": true
|
||||
},
|
||||
"try": {
|
||||
"after": true
|
||||
},
|
||||
"catch": {
|
||||
"after": true
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"line-comment-position": "off",
|
||||
"linebreak-style": "off",
|
||||
"lines-around-comment": "off",
|
||||
"lines-around-directive": "off",
|
||||
"lines-between-class-members": "error",
|
||||
"max-classes-per-file": "error",
|
||||
"max-depth": "off",
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-lines-per-function": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "off",
|
||||
"multiline-comment-style": "off",
|
||||
"multiline-ternary": "off",
|
||||
"new-parens": "off",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-alert": "off",
|
||||
"no-array-constructor": "off",
|
||||
"no-await-in-loop": "error",
|
||||
"no-bitwise": "off",
|
||||
"no-buffer-constructor": "off",
|
||||
"no-caller": "error",
|
||||
"no-catch-shadow": "off",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-console": "off",
|
||||
"no-constant-condition": [
|
||||
"error",
|
||||
{
|
||||
"checkLoops": false
|
||||
}
|
||||
],
|
||||
"no-constructor-return": "error",
|
||||
"no-continue": "off",
|
||||
"no-div-regex": "off",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-else-return": "off",
|
||||
"no-empty-function": "off",
|
||||
"no-eq-null": "off",
|
||||
"no-eval": "off",
|
||||
"no-extend-native": "off",
|
||||
"no-extra-bind": "off",
|
||||
"no-extra-label": "off",
|
||||
"no-extra-parens": "off",
|
||||
"no-floating-decimal": "off",
|
||||
"no-implicit-coercion": [
|
||||
"error",
|
||||
{
|
||||
"boolean": false,
|
||||
"number": false,
|
||||
"string": false
|
||||
}
|
||||
],
|
||||
"no-implicit-globals": "off",
|
||||
"no-implied-eval": "error",
|
||||
"no-inline-comments": "off",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-label-var": "off",
|
||||
"no-labels": "off",
|
||||
"no-lone-blocks": "off",
|
||||
"no-lonely-if": "off",
|
||||
"no-loop-func": "off",
|
||||
"no-loss-of-precision": "error",
|
||||
"no-magic-numbers": "off",
|
||||
"no-mixed-operators": "off",
|
||||
"no-mixed-requires": "off",
|
||||
"no-multi-assign": "off",
|
||||
"no-multi-spaces": "off",
|
||||
"no-multi-str": "error",
|
||||
"no-multiple-empty-lines": ["warn", { "max": 4, "maxEOF": 0 }],
|
||||
"no-native-reassign": "off",
|
||||
"no-negated-condition": "off",
|
||||
"no-negated-in-lhs": "error",
|
||||
"no-nested-ternary": "off",
|
||||
"no-new": "off",
|
||||
"no-new-func": "off",
|
||||
"no-new-object": "off",
|
||||
"no-new-require": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-path-concat": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-process-env": "off",
|
||||
"no-process-exit": "off",
|
||||
"no-promise-executor-return": "error",
|
||||
"no-proto": "off",
|
||||
"no-restricted-exports": "error",
|
||||
"no-restricted-globals": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-return-assign": "off",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "off",
|
||||
"no-self-compare": "off",
|
||||
"no-sequences": "off",
|
||||
"no-shadow": "off",
|
||||
"no-spaced-func": "off",
|
||||
"no-sync": "off",
|
||||
"no-tabs": "off",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-ternary": "off",
|
||||
"no-throw-literal": "off",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "off",
|
||||
"no-undefined": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unmodified-loop-condition": "off",
|
||||
"no-unneeded-ternary": "off",
|
||||
"no-unreachable-loop": "error",
|
||||
"no-unused-expressions": "off",
|
||||
"no-use-before-define": "off",
|
||||
"no-useless-backreference": "error",
|
||||
"no-useless-call": "off",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-concat": "off",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-useless-return": "off",
|
||||
"no-var": "off",
|
||||
"no-void": "off",
|
||||
"no-warning-comments": "off",
|
||||
"no-whitespace-before-property": "error",
|
||||
"nonblock-statement-body-position": [
|
||||
"error",
|
||||
"any"
|
||||
],
|
||||
"object-curly-newline": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"object-property-newline": "off",
|
||||
"object-shorthand": "off",
|
||||
"one-var": "off",
|
||||
"one-var-declaration-per-line": "off",
|
||||
"operator-assignment": "off",
|
||||
"operator-linebreak": "off",
|
||||
"padded-blocks": "off",
|
||||
"padding-line-between-statements": "error",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-const": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-exponentiation-operator": "off",
|
||||
"prefer-named-capture-group": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-object-spread": "off",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"prefer-reflect": "off",
|
||||
"prefer-regex-literals": "off",
|
||||
"prefer-rest-params": "off",
|
||||
"prefer-spread": "off",
|
||||
"prefer-template": "off",
|
||||
"quote-props": "off",
|
||||
"quotes": "off",
|
||||
"radix": "off",
|
||||
"require-atomic-updates": "error",
|
||||
"require-await": "error",
|
||||
"require-jsdoc": "off",
|
||||
"require-unicode-regexp": "off",
|
||||
"rest-spread-spacing": "error",
|
||||
"semi": "off",
|
||||
"semi-spacing": "off",
|
||||
"semi-style": "off",
|
||||
"sort-imports": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "off",
|
||||
"space-before-blocks": "off",
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": "off",
|
||||
"space-infix-ops": "off",
|
||||
"space-unary-ops": "off",
|
||||
"spaced-comment": "off",
|
||||
"strict": "off",
|
||||
"switch-colon-spacing": "off",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"valid-jsdoc": "off",
|
||||
"valid-typeof": [
|
||||
"error",
|
||||
{
|
||||
"requireStringLiterals": false
|
||||
}
|
||||
],
|
||||
"vars-on-top": "off",
|
||||
"wrap-iife": "off",
|
||||
"wrap-regex": "off",
|
||||
"yield-star-spacing": "error",
|
||||
"yoda": "off",
|
||||
"no-useless-escape": "off",
|
||||
"no-unused-vars": "off",
|
||||
"no-empty": "off",
|
||||
"no-extra-semi": "off",
|
||||
"no-redeclare": "off",
|
||||
"no-control-regex": "off",
|
||||
"no-mixed-spaces-and-tabs": "off",
|
||||
"no-extra-boolean-cast": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-undef": "off",
|
||||
"no-unreachable": "off",
|
||||
"no-self-assign": "off"
|
||||
}
|
||||
}
|
283
.eslintrc.yml
283
.eslintrc.yml
@ -1,283 +0,0 @@
|
||||
env:
|
||||
browser: true
|
||||
commonjs: true
|
||||
es2021: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
globals:
|
||||
"$tw": "writable" # temporary
|
||||
parserOptions:
|
||||
ecmaVersion: 5
|
||||
rules:
|
||||
array-bracket-newline: 'off'
|
||||
array-bracket-spacing: 'off'
|
||||
array-callback-return: 'off'
|
||||
array-element-newline: 'off'
|
||||
arrow-body-style: error
|
||||
arrow-parens:
|
||||
- error
|
||||
- as-needed
|
||||
arrow-spacing:
|
||||
- error
|
||||
- after: true
|
||||
before: true
|
||||
block-scoped-var: 'off'
|
||||
block-spacing: 'off'
|
||||
brace-style: 'off'
|
||||
callback-return: 'off'
|
||||
camelcase: 'off'
|
||||
capitalized-comments: 'off'
|
||||
class-methods-use-this: error
|
||||
comma-dangle: 'off'
|
||||
comma-spacing: 'off'
|
||||
comma-style: 'off'
|
||||
complexity: 'off'
|
||||
computed-property-spacing: 'off'
|
||||
consistent-return: 'off'
|
||||
consistent-this: 'off'
|
||||
curly: 'off'
|
||||
default-case: 'off'
|
||||
default-case-last: error
|
||||
default-param-last: error
|
||||
dot-location: 'off'
|
||||
dot-notation: 'off'
|
||||
eol-last: 'off'
|
||||
eqeqeq: 'off'
|
||||
func-call-spacing: 'off'
|
||||
func-name-matching: 'off'
|
||||
func-names: 'off'
|
||||
func-style: 'off'
|
||||
function-call-argument-newline: 'off'
|
||||
function-paren-newline: 'off'
|
||||
generator-star-spacing: error
|
||||
global-require: 'off'
|
||||
grouped-accessor-pairs: error
|
||||
guard-for-in: 'off'
|
||||
handle-callback-err: 'off'
|
||||
id-blacklist: error
|
||||
id-denylist: error
|
||||
id-length: 'off'
|
||||
id-match: error
|
||||
implicit-arrow-linebreak: error
|
||||
indent: 'off'
|
||||
indent-legacy: 'off'
|
||||
init-declarations: 'off'
|
||||
jsx-quotes: error
|
||||
key-spacing: 'off'
|
||||
keyword-spacing:
|
||||
- error
|
||||
- before: true
|
||||
after: false
|
||||
overrides:
|
||||
'case':
|
||||
after: true
|
||||
'do':
|
||||
'after': true
|
||||
'else':
|
||||
after: true
|
||||
'return':
|
||||
after: true
|
||||
'throw':
|
||||
after: true
|
||||
'try':
|
||||
after: true
|
||||
line-comment-position: 'off'
|
||||
linebreak-style: 'off'
|
||||
lines-around-comment: 'off'
|
||||
lines-around-directive: 'off'
|
||||
lines-between-class-members: error
|
||||
max-classes-per-file: error
|
||||
max-depth: 'off'
|
||||
max-len: 'off'
|
||||
max-lines: 'off'
|
||||
max-lines-per-function: 'off'
|
||||
max-nested-callbacks: error
|
||||
max-params: 'off'
|
||||
max-statements: 'off'
|
||||
max-statements-per-line: 'off'
|
||||
multiline-comment-style: 'off'
|
||||
multiline-ternary: 'off'
|
||||
new-parens: 'off'
|
||||
newline-after-var: 'off'
|
||||
newline-before-return: 'off'
|
||||
newline-per-chained-call: 'off'
|
||||
no-alert: 'off'
|
||||
no-array-constructor: 'off'
|
||||
no-await-in-loop: error
|
||||
no-bitwise: 'off'
|
||||
no-buffer-constructor: 'off'
|
||||
no-caller: error
|
||||
no-catch-shadow: 'off'
|
||||
no-confusing-arrow: error
|
||||
no-console: 'off'
|
||||
no-constant-condition:
|
||||
- error
|
||||
- checkLoops: false
|
||||
no-constructor-return: error
|
||||
no-continue: 'off'
|
||||
no-div-regex: 'off'
|
||||
no-duplicate-imports: error
|
||||
no-else-return: 'off'
|
||||
no-empty-function: 'off'
|
||||
no-eq-null: 'off'
|
||||
no-eval: 'off'
|
||||
no-extend-native: 'off'
|
||||
no-extra-bind: 'off'
|
||||
no-extra-label: 'off'
|
||||
no-extra-parens: 'off'
|
||||
no-floating-decimal: 'off'
|
||||
no-implicit-coercion:
|
||||
- error
|
||||
- boolean: false
|
||||
number: false
|
||||
string: false
|
||||
no-implicit-globals: 'off'
|
||||
no-implied-eval: error
|
||||
no-inline-comments: 'off'
|
||||
no-invalid-this: 'off'
|
||||
no-iterator: error
|
||||
no-label-var: 'off'
|
||||
no-labels: 'off'
|
||||
no-lone-blocks: 'off'
|
||||
no-lonely-if: 'off'
|
||||
no-loop-func: 'off'
|
||||
no-loss-of-precision: error
|
||||
no-magic-numbers: 'off'
|
||||
no-mixed-operators: 'off'
|
||||
no-mixed-requires: 'off'
|
||||
no-multi-assign: 'off'
|
||||
no-multi-spaces: 'off'
|
||||
no-multi-str: error
|
||||
no-multiple-empty-lines: 'off'
|
||||
no-native-reassign: 'off'
|
||||
no-negated-condition: 'off'
|
||||
no-negated-in-lhs: error
|
||||
no-nested-ternary: 'off'
|
||||
no-new: 'off'
|
||||
no-new-func: 'off'
|
||||
no-new-object: 'off'
|
||||
no-new-require: error
|
||||
no-new-wrappers: error
|
||||
no-octal-escape: error
|
||||
no-param-reassign: 'off'
|
||||
no-path-concat: error
|
||||
no-plusplus: 'off'
|
||||
no-process-env: 'off'
|
||||
no-process-exit: 'off'
|
||||
no-promise-executor-return: error
|
||||
no-proto: 'off'
|
||||
no-restricted-exports: error
|
||||
no-restricted-globals: error
|
||||
no-restricted-imports: error
|
||||
no-restricted-modules: error
|
||||
no-restricted-properties: error
|
||||
no-restricted-syntax: error
|
||||
no-return-assign: 'off'
|
||||
no-return-await: error
|
||||
no-script-url: 'off'
|
||||
no-self-compare: 'off'
|
||||
no-sequences: 'off'
|
||||
no-shadow: 'off'
|
||||
no-spaced-func: 'off'
|
||||
no-sync: 'off'
|
||||
no-tabs: 'off'
|
||||
no-template-curly-in-string: error
|
||||
no-ternary: 'off'
|
||||
no-throw-literal: 'off'
|
||||
no-trailing-spaces: 'off'
|
||||
no-undef-init: 'off'
|
||||
no-undefined: 'off'
|
||||
no-underscore-dangle: 'off'
|
||||
no-unmodified-loop-condition: 'off'
|
||||
no-unneeded-ternary: 'off'
|
||||
no-unreachable-loop: error
|
||||
no-unused-expressions: 'off'
|
||||
no-use-before-define: 'off'
|
||||
no-useless-backreference: error
|
||||
no-useless-call: 'off'
|
||||
no-useless-computed-key: error
|
||||
no-useless-concat: 'off'
|
||||
no-useless-constructor: error
|
||||
no-useless-rename: error
|
||||
no-useless-return: 'off'
|
||||
no-var: 'off'
|
||||
no-void: 'off'
|
||||
no-warning-comments: 'off'
|
||||
no-whitespace-before-property: error
|
||||
nonblock-statement-body-position:
|
||||
- error
|
||||
- any
|
||||
object-curly-newline: 'off'
|
||||
object-curly-spacing: 'off'
|
||||
object-property-newline: 'off'
|
||||
object-shorthand: 'off'
|
||||
one-var: 'off'
|
||||
one-var-declaration-per-line: 'off'
|
||||
operator-assignment: 'off'
|
||||
operator-linebreak: 'off'
|
||||
padded-blocks: 'off'
|
||||
padding-line-between-statements: error
|
||||
prefer-arrow-callback: 'off'
|
||||
prefer-const: 'off'
|
||||
prefer-destructuring: 'off'
|
||||
prefer-exponentiation-operator: 'off'
|
||||
prefer-named-capture-group: 'off'
|
||||
prefer-numeric-literals: error
|
||||
prefer-object-spread: 'off'
|
||||
prefer-promise-reject-errors: error
|
||||
prefer-reflect: 'off'
|
||||
prefer-regex-literals: 'off'
|
||||
prefer-rest-params: 'off'
|
||||
prefer-spread: 'off'
|
||||
prefer-template: 'off'
|
||||
quote-props: 'off'
|
||||
quotes: 'off'
|
||||
radix: 'off'
|
||||
require-atomic-updates: error
|
||||
require-await: error
|
||||
require-jsdoc: 'off'
|
||||
require-unicode-regexp: 'off'
|
||||
rest-spread-spacing: error
|
||||
semi: 'off'
|
||||
semi-spacing: 'off'
|
||||
semi-style: 'off'
|
||||
sort-imports: error
|
||||
sort-keys: 'off'
|
||||
sort-vars: 'off'
|
||||
space-before-blocks: 'off'
|
||||
space-before-function-paren: 'off'
|
||||
space-in-parens: 'off'
|
||||
space-infix-ops: 'off'
|
||||
space-unary-ops: 'off'
|
||||
spaced-comment: 'off'
|
||||
strict: 'off'
|
||||
switch-colon-spacing: 'off'
|
||||
symbol-description: error
|
||||
template-curly-spacing: error
|
||||
template-tag-spacing: error
|
||||
unicode-bom:
|
||||
- error
|
||||
- never
|
||||
valid-jsdoc: 'off'
|
||||
valid-typeof:
|
||||
- error
|
||||
- requireStringLiterals: false
|
||||
vars-on-top: 'off'
|
||||
wrap-iife: 'off'
|
||||
wrap-regex: 'off'
|
||||
yield-star-spacing: error
|
||||
yoda: 'off'
|
||||
|
||||
# temporary rules
|
||||
no-useless-escape: 'off'
|
||||
no-unused-vars: 'off'
|
||||
no-empty: 'off'
|
||||
no-extra-semi: 'off'
|
||||
no-redeclare: 'off'
|
||||
no-control-regex: "off"
|
||||
no-mixed-spaces-and-tabs: "off"
|
||||
no-extra-boolean-cast: "off"
|
||||
no-prototype-builtins: "off"
|
||||
no-undef: "off"
|
||||
no-unreachable: "off"
|
||||
no-self-assign: "off"
|
32
dprint.json
Normal file
32
dprint.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"lineWidth": 120,
|
||||
"typescript": {
|
||||
"quoteProps": "asNeeded",
|
||||
"ifStatement.spaceAfterIfKeyword": false,
|
||||
"forStatement.spaceAfterForKeyword": false,
|
||||
"whileStatement.spaceAfterWhileKeyword": false,
|
||||
"spaceSurroundingProperties": false,
|
||||
"useTabs": true,
|
||||
"indentWidth": 1,
|
||||
"quoteStyle": "preferDouble",
|
||||
"binaryExpression.operatorPosition": "sameLine",
|
||||
"trailingCommas": "never",
|
||||
"spaceAround": false
|
||||
},
|
||||
"json": {
|
||||
"useTabs": true,
|
||||
"indentWidth": 1
|
||||
},
|
||||
"markdown": {},
|
||||
"includes": [
|
||||
"**/*.{js,json,md}",
|
||||
"./*.json",
|
||||
"./*.js"
|
||||
],
|
||||
"excludes": ["**/node_modules", "**/*-lock.json", "**.min*", "sjcl.js"],
|
||||
"plugins": [
|
||||
"https://plugins.dprint.dev/typescript-0.84.4.wasm",
|
||||
"https://plugins.dprint.dev/json-0.17.2.wasm",
|
||||
"https://plugins.dprint.dev/markdown-0.15.2.wasm"
|
||||
]
|
||||
}
|
@ -3,7 +3,6 @@
|
||||
Library function for creating widget using a dom creating function
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
|
@ -3,7 +3,6 @@
|
||||
Hello, World widget
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
@ -38,7 +37,7 @@ Refresh if the attribute value changed since render
|
||||
MyWidget.prototype.refresh = function(changedTiddlers) {
|
||||
// Find which attributes have changed
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if (changedAttributes.message) {
|
||||
if(changedAttributes.message) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
@ -47,4 +46,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
exports.hello = MyWidget;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
Hello, World widget
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
@ -43,4 +42,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
exports.hello = MyWidget;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
widget to count the number of times this widget refreshes
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
@ -39,4 +38,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
exports.refreshcount = MyWidget;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
Hello, World widget
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
@ -32,4 +31,3 @@ MyWidget.prototype.render = function(parent, nextSibling) {
|
||||
};
|
||||
|
||||
exports.tiddlerfield = MyWidget;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
Hello, World widget
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
@ -42,4 +41,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
exports.tiddlerfield = MyWidget;
|
||||
|
||||
|
70
package.json
70
package.json
@ -1,37 +1,37 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.3.1-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jeremy Ruston",
|
||||
"email": "jeremy@jermolene.com"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"tiddlywiki": "./tiddlywiki.js"
|
||||
},
|
||||
"main": "./boot/boot.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Jermolene/TiddlyWiki5.git"
|
||||
},
|
||||
"keywords": [
|
||||
"tiddlywiki",
|
||||
"tiddlywiki5",
|
||||
"wiki"
|
||||
],
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0"
|
||||
},
|
||||
"bundleDependencies": [],
|
||||
"license": "BSD",
|
||||
"engines": {
|
||||
"node": ">=0.8.2"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint ."
|
||||
}
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": true,
|
||||
"version": "5.3.1-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jeremy Ruston",
|
||||
"email": "jeremy@jermolene.com"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"tiddlywiki": "./tiddlywiki.js"
|
||||
},
|
||||
"main": "./boot/boot.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Jermolene/TiddlyWiki5.git"
|
||||
},
|
||||
"keywords": [
|
||||
"tiddlywiki",
|
||||
"tiddlywiki5",
|
||||
"wiki"
|
||||
],
|
||||
"devDependencies": {
|
||||
"dprint": "0.38.3"
|
||||
},
|
||||
"bundleDependencies": [],
|
||||
"license": "BSD",
|
||||
"engines": {
|
||||
"node": ">=0.8.2"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint ."
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ Startup code injected as raw markup
|
||||
|
||||
\*/
|
||||
|
||||
(function() {
|
||||
|
||||
// Need to initialise these because we run before bootprefix.js and boot.js
|
||||
$tw = window.$tw || Object.create(null);
|
||||
$tw.hooks = $tw.hooks || { names: {}};
|
||||
@ -30,7 +28,7 @@ function hookBootTiddlersLoaded() {
|
||||
// Check that browser storage is available
|
||||
try {
|
||||
window.localStorage;
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
// Step through each browsder storage item
|
||||
@ -45,7 +43,7 @@ function hookBootTiddlersLoaded() {
|
||||
if(jsonString) {
|
||||
try {
|
||||
jsonData = JSON.parse(jsonString);
|
||||
} catch(e) {}
|
||||
} catch (e) {}
|
||||
if(jsonData) {
|
||||
// Convert it to a tiddler
|
||||
var incomingTiddler = new $tw.Tiddler(jsonData);
|
||||
@ -89,4 +87,3 @@ function hookBootTiddlersLoaded() {
|
||||
text: $tw.utils.stringifyList(log)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@ module-type: widget
|
||||
Wraps up the fenced code blocks parser for highlight and use in TiddlyWiki5
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
@ -17,7 +16,7 @@ var CodeBlockWidget = require("$:/core/modules/widgets/codeblock.js").codeblock;
|
||||
|
||||
var hljs = require("$:/plugins/tiddlywiki/highlight-legacy/highlight.js");
|
||||
|
||||
hljs.configure({tabReplace: " "});
|
||||
hljs.configure({tabReplace: " "});
|
||||
|
||||
CodeBlockWidget.prototype.postRender = function() {
|
||||
var domNode = this.domNodes[0],
|
||||
@ -29,7 +28,7 @@ CodeBlockWidget.prototype.postRender = function() {
|
||||
if(language && hljs.getLanguage(language)) {
|
||||
domNode.className = language.toLowerCase() + " hljs";
|
||||
if($tw.browser && !domNode.isTiddlyWikiFakeDom) {
|
||||
hljs.highlightBlock(domNode);
|
||||
hljs.highlightBlock(domNode);
|
||||
} else {
|
||||
var text = domNode.textContent;
|
||||
domNode.children[0].innerHTML = hljs.fixMarkup(hljs.highlight(language,text).value);
|
||||
@ -38,6 +37,5 @@ CodeBlockWidget.prototype.postRender = function() {
|
||||
domNode.children[0].textInnerHTML = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user