Skip to content

Commit

Permalink
Add ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Sep 30, 2020
1 parent 880c441 commit fde13ce
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"rules": {
"indent": [2, 4],
"quotes": [2, "single"],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
"brace-style": 2,
"camelcase": [2, { "properties": "always" }],
"no-var": 2,
"no-const-assign": 2,
"arrow-parens": [2, "always"],
"arrow-spacing": 2,
"space-before-function-paren": [2, "never"],
"no-spaced-func": 2,
"prefer-template": 2,
"prefer-const": 1,
"no-this-before-super": 2,
"comma-spacing": [2, { "before": false, "after": true }],
"comma-dangle": [1, "always-multiline"],
"no-dupe-keys": 2,
"no-debugger": 2,
"no-unreachable": 2,
"valid-jsdoc": 2,
"require-jsdoc": 1,
"space-before-blocks": 2,
"space-infix-ops": 2,
"keyword-spacing": 2,
"no-trailing-spaces": 2,
"max-len": [2, 80, 4, { "ignoreUrls": true, "ignorePattern": "^\\s*const\\s.+=\\s*require\\s*\\(" }],
"guard-for-in": 2,
"no-alert": 2,
"no-throw-literal": 2,
"object-curly-spacing": [2, "never"],
"no-array-constructor": 2,
"no-new-object": 2,
"no-console": 2,
"one-var": [2, "never"]
},
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"root": true
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package-lock.json
node_modules
KhanAcademyLibs/math-translator.js
2 changes: 2 additions & 0 deletions options.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ <h3>Please select your language</h3>
<li>Thousand separator</li>
<li>Multiplication</li>
<li>Division</li>
<li>Trigonometry functions</li>
<li>Coordinates and intervals</li>
</ul>
</div>

Expand Down
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "khan-academy-dots",
"description": "Translate math notation in Khan Academy Crowdin strings.",
"author": "Daniel Hollas & Szymon Bubak & Krzysztof Krystek & Robert Pala",
"version": "3.3.0",
"main": "app.js",
"scripts": {
"lint": "eslint *.js"
},
"repository": {
"type": "git",
"url": "https://github.com:szmeku/KhanAcademyDots"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/szmeku/KhanAcademyDots/issues"
},
"homepage": "https://github.com/szmeku/KhanAcademyDots",
"devDependencies": {
"eslint": "^7.10.0",
"pre-commit": "^1.2.2"
},
"pre-commit": [
"lint"
]
}

0 comments on commit fde13ce

Please sign in to comment.