mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-30 19:52:28 +08:00
Updated package.json & added various config files.
This commit is contained in:
parent
203ee28f70
commit
a54dc7679f
19
.editorconfig
Normal file
19
.editorconfig
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Configurations to normalize the IDE behavior.
|
||||||
|
# http://editorconfig.org/
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
tab_width = 4
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.{js,jsx,ts}]
|
||||||
|
quote_type = single
|
||||||
|
|
||||||
|
[package.json]
|
||||||
|
indent_style = space
|
||||||
|
tab_width = 2
|
25
.eslintrc.js
Normal file
25
.eslintrc.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/* eslint-env node */
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
extends: 'ckeditor5',
|
||||||
|
root: true,
|
||||||
|
rules: {
|
||||||
|
// This rule disallows importing core DLL packages directly. Imports should be done using the `ckeditor5` package.
|
||||||
|
// Also, importing non-DLL packages is not allowed. If the package requires other features to work, they should be
|
||||||
|
// specified as soft-requirements.
|
||||||
|
// Read more: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/migration/migration-to-26.html#soft-requirements.
|
||||||
|
'ckeditor5-rules/ckeditor-imports': 'error'
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: [ 'tests/**/*.js', 'sample/**/*.js' ],
|
||||||
|
rules: {
|
||||||
|
// To write complex tests, you may need to import files that are not exported in DLL files by default.
|
||||||
|
// Hence, imports CKEditor 5 packages in test files are not checked.
|
||||||
|
'ckeditor5-rules/ckeditor-imports': 'off'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
18
.gitattributes
vendored
Normal file
18
.gitattributes
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.htaccess eol=lf
|
||||||
|
*.cgi eol=lf
|
||||||
|
*.sh eol=lf
|
||||||
|
|
||||||
|
*.css text
|
||||||
|
*.htm text
|
||||||
|
*.html text
|
||||||
|
*.js text
|
||||||
|
*.json text
|
||||||
|
*.php text
|
||||||
|
*.txt text
|
||||||
|
*.md text
|
||||||
|
|
||||||
|
*.png -text
|
||||||
|
*.gif -text
|
||||||
|
*.jpg -text
|
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.nyc_output/
|
||||||
|
coverage/
|
||||||
|
node_modules/
|
||||||
|
yarn.lock
|
||||||
|
tmp/
|
||||||
|
build/
|
||||||
|
yarn.error
|
3
.stylelintrc
Normal file
3
.stylelintrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "stylelint-config-ckeditor5"
|
||||||
|
}
|
35
package.json
35
package.json
@ -47,10 +47,41 @@
|
|||||||
"@ckeditor/ckeditor5-typing": "^32.0.0",
|
"@ckeditor/ckeditor5-typing": "^32.0.0",
|
||||||
"@ckeditor/ckeditor5-undo": "^32.0.0",
|
"@ckeditor/ckeditor5-undo": "^32.0.0",
|
||||||
"@ckeditor/ckeditor5-widget": "^32.0.0",
|
"@ckeditor/ckeditor5-widget": "^32.0.0",
|
||||||
|
"@ckeditor/ckeditor5-package-tools": "^1.0.0-beta.4",
|
||||||
|
"@ckeditor/ckeditor5-theme-lark": ">=32.0.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-ckeditor5": ">=3.1.1"
|
"eslint-config-ckeditor5": ">=3.1.1",
|
||||||
|
"http-server": "^14.1.0",
|
||||||
|
"husky": "^4.2.5",
|
||||||
|
"lint-staged": "^10.2.6",
|
||||||
|
"stylelint": "^13.13.1",
|
||||||
|
"stylelint-config-ckeditor5": ">=2.0.1"
|
||||||
},
|
},
|
||||||
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dll:build": "webpack"
|
"dll:build": "ckeditor5-package-tools dll:build",
|
||||||
|
"dll:serve": "http-server ./ -o sample/dll.html",
|
||||||
|
"lint": "eslint \"**/*.js\" --quiet --ignore-pattern \"build/\"",
|
||||||
|
"start": "ckeditor5-package-tools start",
|
||||||
|
"stylelint": "stylelint --quiet --allow-empty-input 'theme/*.css'",
|
||||||
|
"test": "ckeditor5-package-tools test",
|
||||||
|
"prepare": "yarn run dll:build",
|
||||||
|
"prepublishOnly": "yarn run dll:build",
|
||||||
|
"translations:collect": "ckeditor5-package-tools translations:collect",
|
||||||
|
"translations:download": "ckeditor5-package-tools translations:download",
|
||||||
|
"translations:upload": "ckeditor5-package-tools translations:upload"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"**/*.js": [
|
||||||
|
"eslint --quiet"
|
||||||
|
],
|
||||||
|
"**/*.css": [
|
||||||
|
"stylelint --quiet --allow-empty-input"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "lint-staged"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user