Browse Source

setup eslint/stylelint

Yuki Takei 7 years ago
parent
commit
c40f2efb97

+ 4 - 0
packages/growi-plugin-pukiwiki-like-linker/.eslintignore

@@ -0,0 +1,4 @@
+/.github/**
+/.vscode/**
+/node_modules/**
+/lib/**

+ 13 - 0
packages/growi-plugin-pukiwiki-like-linker/.eslintrc.js

@@ -0,0 +1,13 @@
+module.exports = {
+  extends: [
+    'weseek',
+  ],
+  env: {
+  },
+  globals: {
+  },
+  plugins: [
+  ],
+  rules: {
+  },
+};

+ 0 - 0
packages/growi-plugin-pukiwiki-like-linker/.prettierignore


+ 5 - 0
packages/growi-plugin-pukiwiki-like-linker/.prettierrc

@@ -0,0 +1,5 @@
+{
+  "printWidth": 160,
+  "singleQuote": true,
+  "trailingComma": "all"
+}

+ 13 - 5
packages/growi-plugin-pukiwiki-like-linker/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "growi-plugin-pukiwiki-like-linker",
   "name": "growi-plugin-pukiwiki-like-linker",
-  "version": "1.1.0",
+  "version": "2.0.0",
   "description": "GROWI plugin to add PukiwikiLikeLinker",
   "description": "GROWI plugin to add PukiwikiLikeLinker",
   "keywords": [
   "keywords": [
     "growi",
     "growi",
@@ -11,6 +11,11 @@
     "src"
     "src"
   ],
   ],
   "scripts": {
   "scripts": {
+    "lint:js:fix": "eslint **/*.{js,jsx} --fix",
+    "lint:js": "eslint **/*.{js,jsx}",
+    "lint:styles:fix": "prettier-stylelint --quiet --write src/**/*.scss",
+    "lint:styles": "stylelint src/**/*.scss",
+    "lint": "npm-run-all -p lint:js lint:styles",
     "test": ""
     "test": ""
   },
   },
   "repository": {
   "repository": {
@@ -26,10 +31,13 @@
   "dependencies": {
   "dependencies": {
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "babel-preset-env": "^1.6.0",
-    "babel-preset-react": "^6.24.1",
-    "eslint": "^5.9.0",
-    "eslint-plugin-react": "^7.11.1"
+    "babel-eslint": "^10.0.1",
+    "babel-preset-env": "^1.7.0",
+    "eslint": "^5.15.1",
+    "eslint-config-weseek": "^1.0.1",
+    "eslint-plugin-import": "^2.16.0",
+    "npm-run-all": "^4.1.5",
+    "prettier-stylelint": "^0.4.2"
   },
   },
   "engines": {
   "engines": {
     "node": ">=8.11.1 <11",
     "node": ">=8.11.1 <11",

File diff suppressed because it is too large
+ 608 - 134
packages/growi-plugin-pukiwiki-like-linker/yarn.lock


Some files were not shown because too many files changed in this diff