Skip to content

Commit

Permalink
Merge pull request puranjayjain#207 from digitalkaoz/feature/coding_s…
Browse files Browse the repository at this point in the history
…tyles

use eslint standard coding style
  • Loading branch information
digitalkaoz authored Mar 14, 2017
2 parents c9bfb4d + 6576d96 commit 7d7a475
Show file tree
Hide file tree
Showing 11 changed files with 6,782 additions and 1,794 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ root = true

[*.js]
charset = utf-8
indent_style = tab
indent_size = 8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "standard",
"plugins": [
"standard",
"promise"
],
"parser": "babel-eslint",
"env": {
"browser": true
}
}
250 changes: 5 additions & 245 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -1,247 +1,7 @@
java_script:
ignore_file: .javascript_ignore
eslint:
enabled: true
config_file: .eslintrc

scss:
scss_files: "**/*.scss"

# Default severity of all linters.
severity: warning

linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false

BemDepth:
enabled: false
max_elements: 1

BorderZero:
enabled: true
convention: zero # or `none`

ChainedClasses:
enabled: false

ColorKeyword:
enabled: true

ColorVariable:
enabled: true

Comment:
enabled: true
style: silent

DebugStatement:
enabled: true

DeclarationOrder:
enabled: true

DisableLinterReason:
enabled: false

DuplicateProperty:
enabled: false

ElsePlacement:
enabled: true
style: same_line # or 'new_line'

EmptyLineBetweenBlocks:
enabled: true
ignore_single_line_blocks: true

EmptyRule:
enabled: true

ExtendDirective:
enabled: false

FinalNewline:
enabled: true
present: true

HexLength:
enabled: false
style: short # or 'long'

HexNotation:
enabled: true
style: lowercase # or 'uppercase'

HexValidation:
enabled: true

IdSelector:
enabled: true

ImportantRule:
enabled: true

ImportPath:
enabled: true
leading_underscore: false
filename_extension: false

Indentation:
enabled: true
allow_non_nested_indentation: false
character: space # or 'tab'
width: 2

LeadingZero:
enabled: true
style: include_zero # or 'exclude_zero'

MergeableSelector:
enabled: true
force_nesting: true

NameFormat:
enabled: true
allow_leading_underscore: true
convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern

NestingDepth:
enabled: true
max_depth: 4
ignore_parent_selectors: false

PlaceholderInExtend:
enabled: false

PrivateNamingConvention:
enabled: false
prefix: _

PropertyCount:
enabled: true
include_nested: false
max_properties: 10

PropertySortOrder:
enabled: true
ignore_unspecified: false
min_properties: 2
separate_groups: false

PropertySpelling:
enabled: true
extra_properties: []
disabled_properties: []

PropertyUnits:
enabled: true
global: [
'em', 'rem', # Font-relative lengths
'px', # Absolute lengths
'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths
'deg', # Angle
'ms', # Duration
'Hz', 'kHz', # Frequency
'dpi', 'dpcm', 'dppx', # Resolution
'%'] # Other
properties: {}

PseudoElement:
enabled: true

QualifyingElement:
enabled: true
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false

SelectorDepth:
enabled: true
max_depth: 4

SelectorFormat:
enabled: true
convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern

Shorthand:
enabled: true
allowed_shorthands: [1, 2, 3]

SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: true

SingleLinePerSelector:
enabled: true

SpaceAfterComma:
enabled: true
style: one_space

SpaceAfterPropertyColon:
enabled: true
style: one_space

SpaceAfterPropertyName:
enabled: false

SpaceAfterVariableColon:
enabled: true
style: one_space

SpaceAfterVariableName:
enabled: false

SpaceAroundOperator:
enabled: true
style: one_space # or 'at_least_one_space', or 'no_space'

SpaceBeforeBrace:
enabled: true
style: space
allow_single_line_padding: false

SpaceBetweenParens:
enabled: true
spaces: 0

StringQuotes:
enabled: true
style: double_quotes

TrailingSemicolon:
enabled: false

TrailingWhitespace:
enabled: true

TrailingZero:
enabled: false

TransitionAll:
enabled: false

UnnecessaryMantissa:
enabled: true

UnnecessaryParentReference:
enabled: true

UrlFormat:
enabled: true

UrlQuotes:
enabled: true

VariableForProperty:
enabled: false
properties: []

VendorPrefix:
enabled: true
identifier_list: base
additional_identifiers: []
excluded_identifiers: []

ZeroUnit:
enabled: true
config_file: .scss-lint.yml
enabled: true
1 change: 0 additions & 1 deletion .javascript_ignore

This file was deleted.

22 changes: 0 additions & 22 deletions .jsbeautifyrc

This file was deleted.

1 change: 1 addition & 0 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scss_files: "src/scss/**/*.scss"
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ After successfully installing the above components

Most changes made to files inside the `src` directory will cause the page to reload. This page can also be loaded up on physical devices thanks to BrowserSync.

## Tests

```bash
$ npm run cs:scss //lint all scss files
$ npm run cs:js //lint and fix all js files
$ npm run cs //run both cs jobs
```
## Versioning

For transparency into our release cycle and in striving to maintain backward
Expand Down
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "md-date-time-picker",
"version": "2.2.0",
"version": "2.3.0",
"description": "An implementation of the Material Design Picker components in vanilla CSS, JS and HTML",
"keywords": [
"material",
Expand All @@ -17,7 +17,10 @@
"main": "dist/js/mdDateTimePicker.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"gulp": "gulp"
"gulp": "gulp",
"cs": "npm run cs:js && npm run cs:scss",
"cs:js" : "eslint -c .eslintrc --fix src",
"cs:scss" : "scss-lint"
},
"contributors": [
"Seth Westphal (https://github.com/westy92)",
Expand All @@ -29,6 +32,7 @@
"license": "MIT",
"devDependencies": {
"babel-core": "^6.23.1",
"babel-eslint": "^7.1.1",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-es2015-modules-umd": "^6.23.0",
"babel-plugin-transform-member-expression-literals": "^6.8.1",
Expand All @@ -39,6 +43,11 @@
"browser-sync": "^2.18.8",
"chokidar": "^1.6.1",
"del": "^2.2.2",
"eslint": "^3.17.1",
"eslint-config-standard": "^7.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^2.1.1",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.1",
"gulp-babel": "^6.1.2",
Expand All @@ -56,8 +65,8 @@
"run-sequence": "^1.2.2"
},
"dependencies": {
"moment": "^2.17.1",
"draggabilly": "^2.1.1"
"draggabilly": "^2.1.1",
"moment": "^2.17.1"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 7d7a475

Please sign in to comment.