• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision6fbee8ecc9db702173e43a6a1cd0b2f8b4e29a6d (tree)
Zeit2017-10-26 02:16:27
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2436 ESLint - Linting utility for JavaScript

Install utilities:


npm install

Use ESLint:


npm test

or


npx eslint skin/main.js

Ändern Zusammenfassung

Diff

--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,33 @@
1+{
2+ "extends": ["airbnb"],
3+ "plugins": [],
4+ "parserOptions": {
5+ "sourceType": "script"
6+ },
7+ "env": {"browser": true},
8+ "globals": {},
9+ "rules": {
10+ "no-console": 0,
11+ "no-inner-declarations": "warn",
12+ "no-var": 0,
13+ "vars-on-top": 0,
14+ "prefer-template": 0,
15+ "prefer-arrow-callback": 0,
16+ "space-before-function-paren": 0,
17+ "no-plusplus": 0,
18+ "prefer-destructuring": 0,
19+ "no-continue": 0,
20+ "func-names": 0,
21+ "function-paren-newline": 0,
22+ "comma-dangle": 0,
23+ "object-shorthand": 0,
24+ "object-curly-spacing": 0,
25+ "operator-assignment": 0,
26+ "no-multi-assign": 0,
27+ "no-param-reassign": ["warn", { "props": false }],
28+ "strict": ["error", "function"],
29+ "lines-around-directive": 0,
30+ "no-cond-assign": ["error", "except-parens"]
31+ }
32+}
33+
--- /dev/null
+++ b/package.json
@@ -0,0 +1,22 @@
1+{
2+ "name": "pukiwiki",
3+ "version": "1.0.0",
4+ "description": "PukiWiki client JavaScript",
5+ "main": "skin/main.js",
6+ "directories": {
7+ "lib": "lib"
8+ },
9+ "scripts": {
10+ "test": "eslint skin/main.js skin/search2.js"
11+ },
12+ "author": "umorigu",
13+ "license": "GPL-2.0",
14+ "devDependencies": {
15+ "eslint": "*",
16+ "eslint-config-airbnb": "*",
17+ "eslint-plugin-import": "*",
18+ "eslint-plugin-jsx-a11y": "*",
19+ "eslint-plugin-react": "*"
20+ }
21+}
22+