dufu1991 3 年 前
コミット
5750ba48ea

+ 3 - 3
.eslintignore

@@ -4,7 +4,7 @@
 .DS_Store
 /node_modules
 pnpm-lock.yaml
-/scripts
+/backup
 
 # 忽略 demo 相关文件 ignore demo related files
 /demo/node_modules
@@ -20,8 +20,8 @@ pnpm-lock.yaml
 
 # 忽略全部 site 和 publish 文件
 /site
-publish.md
-publish_en.md
+/publish.md
+/publish_en.md
 
 # 忽略 packages 中 stdf 本地构建的文件 ignore the files built by stdf in packages
 /packages/stdf/pnpm-lock.yaml

+ 0 - 26
.eslintrc

@@ -1,26 +0,0 @@
-{
-	"root": true,
-	"extends": [
-		"eslint:recommended",
-		"plugin:svelte/recommended",
-		"plugin:markdown/recommended",
-		"plugin:json/recommended",
-		"plugin:prettier/recommended"
-	],
-	"parserOptions": {
-		"sourceType": "module",
-		"ecmaVersion": 2020,
-		"extraFileExtensions": [".svelte", ".json", ".md"]
-	},
-	"rules": {},
-	"env": {
-		"browser": true,
-		"es6": true,
-		"node": true
-	},
-	"overrides": [
-		{
-			"files": "*.svelte"
-		}
-	]
-}

+ 20 - 0
.eslintrc.js

@@ -0,0 +1,20 @@
+module.exports = {
+	root: true,
+	env: {
+		browser: true,
+		es6: true,
+		node: true,
+	},
+	extends: ['eslint:recommended', 'plugin:svelte/recommended', 'plugin:json/recommended', 'plugin:prettier/recommended'],
+	parserOptions: {
+		sourceType: 'module',
+		ecmaVersion: 2020,
+		extraFileExtensions: ['.svelte'],
+	},
+	rules: {},
+	overrides: [
+		{
+			files: '*.svelte',
+		},
+	],
+};

+ 1 - 1
.gitignore

@@ -4,7 +4,7 @@
 .DS_Store
 /node_modules
 pnpm-lock.yaml
-/scripts
+/backup
 
 # 忽略 demo 相关文件 ignore demo related files
 /demo/node_modules

+ 0 - 9
.prettierrc

@@ -1,9 +0,0 @@
-{
-	"useTabs": true,
-	"singleQuote": true,
-	"trailingComma": "all",
-	"printWidth": 140,
-	"plugins": ["prettier-plugin-svelte"],
-	"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
-	"arrowParens": "avoid"
-}

+ 8 - 0
.prettierrc.js

@@ -0,0 +1,8 @@
+module.exports = {
+	useTabs: true,
+	singleQuote: true,
+	trailingComma: 'all',
+	printWidth: 140,
+	plugins: ['prettier-plugin-svelte'],
+	arrowParens: 'avoid',
+};

+ 1 - 1
demo/src/App.svelte

@@ -5,7 +5,7 @@
 	import { NavBar, Icon } from 'stdf';
 	import zh_CN from 'stdf/lang/zh_CN';
 	import en_US from 'stdf/lang/en_US';
-	import menuList from './data/menuList'
+	import menuList from './data/menuList';
 
 	// 循环 menuList,将所有元素的 childs 组成一个数组
 	// Cycle menuList, and combine the childs of all elements into an array

+ 1 - 0
demo/src/data/aphorisms.js

@@ -22,6 +22,7 @@ export default [
 	},
 	{ text: '御剑乘风来,除魔天地间,有酒乐逍遥,无酒我亦癫。一饮尽江河,再饮吞日月,千杯醉不倒,唯我酒剑仙。', from: '—— 酒剑仙' },
 	{ text: '最美的不是下雨天,是曾与你躲过雨的屋檐。', from: '—— 周杰伦《不能说的秘密》' },
+
 	// English
 	{ text: 'All the splendor in the world is not worth a good friend.', from: '— Voltaire' },
 	{ text: 'Continuous labor is the life of the iron law, also the art of iron.', from: '— Balzac' },

+ 6 - 15
package.json

@@ -1,26 +1,17 @@
 {
 	"name": "stdf",
-	"version": "1.0.0",
-	"description": "<div align=\"center\">",
-	"main": "index.js",
-	"directories": {
-		"doc": "doc"
-	},
+	"version": "0.0.0",
+	"description": "Format code and lint code",
 	"scripts": {
-		"test": "echo \"Error: no test specified\" && exit 1",
-		"lint": "eslint --ext .svelte,.js,.json ./demo",
-		"format": "prettier --write ./demo/**/*.{js,json,svelte,ts,css,html,cjs,md}  ",
-		"check": "prettier ./demo --check",
-		"lint-md": "lint-md ./**/*"
+		"format": "prettier . --write --plugin prettier-plugin-svelte",
+		"lint": "eslint --ext .js,.svelte,.json,.ts,.cjs ."
 	},
-	"author": "",
-	"license": "ISC",
+	"author": "dufu1991",
+	"license": "MIT",
 	"devDependencies": {
-		"@lint-md/cli": "^2.0.0",
 		"eslint": "^8.48.0",
 		"eslint-config-prettier": "^9.0.0",
 		"eslint-plugin-json": "^3.1.0",
-		"eslint-plugin-markdown": "^3.0.1",
 		"eslint-plugin-prettier": "^5.0.0",
 		"eslint-plugin-svelte": "^2.33.0",
 		"prettier-plugin-svelte": "^3.0.3",

+ 5 - 5
packages/vscode-extension/CHANGELOG.md

@@ -1,21 +1,21 @@
-# 0.0.9
+## 0.0.9
 
 - Format source code.
 - Display the current version and the latest version of STDF.
 
-# 0.0.8
+## 0.0.8
 
 - Optimized GitHub Actions configuration.
 
-# 0.0.7
+## 0.0.7
 
 - Added direct link to the corresponding component content on the STDF official website at the bottom of the tooltip.
 - Added direct link to the source code of the corresponding component on GitHub/Gitee at the bottom of the tooltip.
 
-# 0.0.6
+## 0.0.6
 
 - Add README.(0.0.2 - 0.0.6)
 
-# 0.0.1
+## 0.0.1
 
 - Init version.

+ 5 - 5
packages/vscode-extension/CHANGELOG_CN.md

@@ -1,21 +1,21 @@
-# 0.0.9
+## 0.0.9
 
 - 格式化源码。
 - 显示 STDF 当前版本与最新版本。
 
-# 0.0.8
+## 0.0.8
 
 - 优化 GitHub Actions 配置。
 
-# 0.0.7
+## 0.0.7
 
 - 悬浮窗底部增加直接跳转 STDF 官网对应组件内容。
 - 悬浮窗底部增加直接跳转 STDF 对应组件源码(GitHub/Gitee)。
 
-# 0.0.6
+## 0.0.6
 
 - 增加 README。(0.0.2 - 0.0.6)
 
-# 0.0.1
+## 0.0.1
 
 - 初始版本。