Skip to content

Commit

Permalink
eslint support in progress
Browse files Browse the repository at this point in the history
js/jsx support added
  • Loading branch information
ganeshrvel committed Jan 13, 2019
1 parent eebda60 commit 25d5a5b
Show file tree
Hide file tree
Showing 100 changed files with 895 additions and 734 deletions.
68 changes: 68 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
.eslintcache

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# OSX
.DS_Store

# flow-typed
flow-typed/npm/*
!flow-typed/npm/module_vx.x.x.js

# App packaged
release
app/main.prod.js
app/main.prod.js.map
app/renderer.prod.js
app/renderer.prod.js.map
app/style.css
app/style.css.map
dist
dll
main.js
main.js.map


.idea
npm-debug.log.*
__snapshots__

# Package.json
package.json
.travis.yml

.idea
vendors
build
docs
.vscode
.github
app/dll
.prettierrc
.stylelintrc
.eslintrc.json
76 changes: 76 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": true
},
"env": {
"browser": true,
"node": true
},
"plugins": ["import", "promise", "compat", "react"],
"extends": ["airbnb", "plugin:prettier/recommended", "prettier/react"],
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack/config.eslint.js"
}
}
},
"rules": {
"arrow-parens": "off",
"compat/compat": "error",
"consistent-return": "off",
"comma-dangle": "off",
"generator-star-spacing": "off",
"import/no-unresolved": "error",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/label-has-for": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"no-console": "off",
"no-use-before-define": "off",
"no-multi-assign": "off",
"prettier/prettier": ["error", { "singleQuote": true }],
"promise/param-names": "error",
"promise/always-return": "error",
"promise/catch-or-return": "error",
"promise/no-native": "off",
"react/sort-comp": [
"error",
{
"order": [
"type-annotations",
"static-methods",
"lifecycle",
"everything-else",
"render"
]
}
],
"react/jsx-no-bind": "off",
"react/jsx-filename-extension": [
"error",
{ "extensions": [".js", ".jsx"] }
],
"react/prefer-stateless-function": "off",
"strict": 0,
"import/prefer-default-export": "off",
"no-unused-vars": [
"error",
{
"args": "after-used",
"argsIgnorePattern": "^(theme|props|state|ownProps|dispatch|getState)|_",
"varsIgnorePattern": "^(variables|mixins|args|log)"
}
],
"arrow-body-style": 0,
"no-underscore-dangle": 0,
"class-methods-use-this": 0,
"no-await-in-loop": 0,
"no-shadow": 0,
"react/prop-types": 0
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ certs/*
*electron-builder.yml
todo.txt
*yarn-error.log
eslint-common-rules.txt
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"overrides": [
{
"files": [".prettierrc", ".babelrc"],
"files": [".prettierrc", ".babelrc", ".eslintrc", ".stylelintrc"],
"options": {
"parser": "json"
}
Expand Down
3 changes: 3 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-prettier"]
}
4 changes: 1 addition & 3 deletions app/api/sys/fileOps.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ export const readFileSync = filePath => {
return _readFileSync(filePath, options);
};

export const fileExistsSync = filePath => {
return _existsSync(filePath);
};
export const fileExistsSync = filePath => _existsSync(filePath);

export const createDirSync = newFolderPath => {
mkdirp.sync(newFolderPath);
Expand Down
Loading

0 comments on commit 25d5a5b

Please sign in to comment.