Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

[JS] Updated JavaScript #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.DS_Store
node_modules
5 changes: 5 additions & 0 deletions javascript/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# (multiple files can be used, and are applied starting from current document location)
root = true

# Special handling of package.json since npm want 2 spaces here
[{package.json}]
indent_style = space
indent_size = 2

# Use bracketed regexp to target specific file types or file locations
[*.{js,json}]

Expand Down
154 changes: 0 additions & 154 deletions javascript/.eslintrc

This file was deleted.

24 changes: 0 additions & 24 deletions javascript/.eslintrc-react

This file was deleted.

101 changes: 0 additions & 101 deletions javascript/.jscsrc

This file was deleted.

35 changes: 0 additions & 35 deletions javascript/.jshintrc

This file was deleted.

4 changes: 4 additions & 0 deletions javascript/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'extends': require.resolve('eslint-config-airbnb/base'),
'rules': require('./override')
}
4 changes: 4 additions & 0 deletions javascript/legacy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'extends': require.resolve('eslint-config-airbnb/legacy'),
'rules': require('./override')
}
6 changes: 6 additions & 0 deletions javascript/override.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'indent': [2, 4, { 'SwitchCase': 1, 'VariableDeclarator': 1 }],
'comma-dangle': [2, 'never'],
'max-len': [2, 120, 4],
'no-use-before-define': [2, { 'functions': false }]
};
5 changes: 4 additions & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
"bugs": {
"url": "https://github.com/vgno/coding-standards/issues"
},
"homepage": "https://github.com/vgno/coding-standards"
"homepage": "https://github.com/vgno/coding-standards",
"dependencies": {
"eslint-config-airbnb": "~6.1.0"
}
}
4 changes: 4 additions & 0 deletions javascript/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'extends': require.resolve('eslint-config-airbnb'),
'rules': require('./override')
}