Skip to content

Instantly share code, notes, and snippets.

@jsnanigans
Last active May 3, 2018 07:59
Show Gist options
  • Select an option

  • Save jsnanigans/6042ab9a3443565c7b366499efc9cce5 to your computer and use it in GitHub Desktop.

Select an option

Save jsnanigans/6042ab9a3443565c7b366499efc9cce5 to your computer and use it in GitHub Desktop.

Revisions

  1. jsnanigans revised this gist May 3, 2018. 3 changed files with 183 additions and 113 deletions.
    24 changes: 5 additions & 19 deletions .eslintrc.js → .eslintrc.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,4 @@
    module.exports = {
    "ecmaFeatures": {
    "modules": true,
    "experimentalObjectRestSpread": true
    },

    "env": {
    "browser": false,
    "es6": true,
    @@ -25,15 +20,6 @@ module.exports = {
    "Gridle": false
    },

    "notused": {

    "handle-callback-err": [2, "^(err|error)$"],
    "indent": [2, 2, {
    "SwitchCase": 1
    }],
    "curly": [2, "multi-line"]

    },

    "rules": {
    "accessor-pairs": 2,
    @@ -137,7 +123,7 @@ module.exports = {
    "defaultAssignment": false
    }],
    "no-unreachable": 2,
    "no-unused-vars": [2, {
    "no-unused-vars": [1, {
    "vars": "all",
    "args": "none"
    }],
    @@ -155,13 +141,13 @@ module.exports = {
    "padded-blocks": [0, "never"],
    "quotes": [2, "single", "avoid-escape"],
    "radix": 2,
    "semi": [2, "always"],
    "semi": [0, "always"],
    "semi-spacing": [2, {
    "before": false,
    "after": true
    }],
    "space-before-blocks": [2, "always"],
    "space-before-function-paren": [2, "never"],
    "space-before-blocks": [1, "always"],
    "space-before-function-paren": [1, "never"],
    "space-in-parens": [2, "never"],
    "space-infix-ops": 2,
    "space-unary-ops": [2, {
    @@ -176,4 +162,4 @@ module.exports = {
    "wrap-iife": [2, "any"],
    "yoda": [2, "never"]
    }
    };
    };
    94 changes: 0 additions & 94 deletions Config: .sass-lint.yml
    Original file line number Diff line number Diff line change
    @@ -1,94 +0,0 @@
    options:
    formatter: stylish
    files:
    include: '**/*.s+(a|c)ss'
    rules:
    # Extends
    extends-before-mixins: 1
    extends-before-declarations: 1
    placeholder-in-extend: 0

    # Mixins
    mixins-before-declarations: 0

    # Line Spacing
    one-declaration-per-line: 0
    empty-line-between-blocks: 0
    single-line-per-selector: 0

    # Disallows
    no-attribute-selectors: 0
    no-color-keywords: 0
    no-color-literals: 0
    no-combinators: 0
    no-css-comments: 1
    no-debug: 1
    no-disallowed-properties: 0
    no-duplicate-properties: 1
    no-empty-rulesets: 1
    no-extends: 0
    no-ids: 1
    no-important: 0
    no-invalid-hex: 1
    no-mergeable-selectors: 1
    no-misspelled-properties:
    - 1
    -
    'extra-properties':
    - 'overflow-scrolling'
    no-qualifying-elements: 1
    no-trailing-whitespace: 1
    no-trailing-zero: 1
    no-transition-all: 1
    no-universal-selectors: 0
    no-url-protocols: 1
    no-vendor-prefixes: 0
    no-warn: 1
    property-units: 0

    # Nesting
    force-attribute-nesting: 1
    force-element-nesting: 1
    force-pseudo-nesting: 1

    # Name Formats
    class-name-format: 0
    function-name-format: 0
    id-name-format: 0
    mixin-name-format: 0
    placeholder-name-format: 0
    variable-name-format: 0

    # Style Guide
    attribute-quotes: 1
    bem-depth: 0
    border-zero: 1
    brace-style: 1
    clean-import-paths: 1
    empty-args: 0
    hex-length: 1
    hex-notation: 1
    indentation: 0
    leading-zero: 0
    nesting-depth: 0
    property-sort-order: 0
    pseudo-element: 0
    quotes: 1
    shorthand-values: 1
    url-quotes: 0
    variable-for-property: 1
    zero-unit: 1

    # Inner Spacing
    space-after-comma: 0
    space-before-colon: 0
    space-after-colon: 1
    space-before-brace: 0
    space-before-bang: 0
    space-after-bang: 0
    space-between-parens: 0
    space-around-operator: 0

    # Final Items
    trailing-semicolon: 1
    final-newline: 0
    178 changes: 178 additions & 0 deletions Config: sass-lint.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,178 @@
    # sass-lint config generated by make-sass-lint-config v0.1.2
    #
    # The following scss-lint Linters are not yet supported by sass-lint:
    # DisableLinterReason, ElsePlacement, PropertyCount, SelectorDepth
    # SpaceAroundOperator, TrailingWhitespace, UnnecessaryParentReference, Compass::*
    #
    # The following settings/values are unsupported by sass-lint:
    # Linter Indentation, option "allow_non_nested_indentation"
    # Linter Indentation, option "character"
    # Linter NestingDepth, option "ignore_parent_selectors"
    # Linter PropertySortOrder, option "min_properties"
    # Linter PropertySortOrder, option "separate_groups"
    # Linter SpaceBeforeBrace, option "allow_single_line_padding"
    # Linter VendorPrefix, option "identifier_list"

    files:
    include: '**/*.scss'
    options:
    formatter: stylish
    merge-default-rules: false
    rules:
    bem-depth:
    - 0
    - max-depth: 1
    border-zero:
    - 1
    - convention: zero
    brace-style:
    - 1
    - allow-single-line: true
    class-name-format:
    - 1
    - convention: hyphenatedlowercase
    clean-import-paths:
    - 1
    - filename-extension: false
    leading-underscore: false
    empty-line-between-blocks:
    - 0
    - ignore-single-line-rulesets: true
    extends-before-declarations: 1
    extends-before-mixins: 1
    final-newline:
    - 1
    - include: true
    force-attribute-nesting: 1
    force-element-nesting: 1
    force-pseudo-nesting: 1
    function-name-format:
    - 1
    - allow-leading-underscore: true
    convention: hyphenatedlowercase
    hex-length:
    - 1
    - style: short
    hex-notation:
    - 1
    - style: lowercase
    id-name-format:
    - 1
    - convention: hyphenatedlowercase
    indentation:
    - 0
    - size: 2
    leading-zero:
    - 1
    - include: false
    mixin-name-format:
    - 1
    - allow-leading-underscore: true
    convention: hyphenatedlowercase
    mixins-before-declarations: 1
    nesting-depth:
    - 0
    - max-depth: 3
    no-color-keywords: 1
    no-color-literals: 0
    no-css-comments: 1
    no-debug: 1
    no-duplicate-properties: 1
    no-empty-rulesets: 1
    no-extends: 0
    no-ids: 1
    no-important: 1
    no-invalid-hex: 1
    no-mergeable-selectors: 1
    no-misspelled-properties:
    - 1
    - extra-properties: []
    no-qualifying-elements:
    - 1
    - allow-element-with-attribute: false
    allow-element-with-class: false
    allow-element-with-id: false
    no-trailing-zero: 1
    no-transition-all: 0
    no-url-protocols: 1
    no-vendor-prefixes:
    - 1
    - additional-identifiers: []
    excluded-identifiers: []
    placeholder-in-extend: 1
    placeholder-name-format:
    - 1
    - convention: hyphenatedlowercase
    property-sort-order:
    - 1
    - ignore-custom-properties: false
    property-units:
    - 1
    - global:
    - ch
    - em
    - ex
    - rem
    - cm
    - in
    - mm
    - pc
    - pt
    - px
    - q
    - vh
    - vw
    - vmin
    - vmax
    - deg
    - grad
    - rad
    - turn
    - ms
    - s
    - Hz
    - kHz
    - dpi
    - dpcm
    - dppx
    - '%'
    per-property: {}
    quotes:
    - 1
    - style: single
    shorthand-values:
    - 1
    - allowed-shorthands:
    - 1
    - 2
    - 3
    single-line-per-selector: 1
    space-after-bang:
    - 1
    - include: false
    space-after-colon:
    - 1
    - include: true
    space-after-comma:
    - 1
    - include: true
    space-before-bang:
    - 1
    - include: true
    space-before-brace:
    - 0
    - include: true
    space-before-colon: 1
    space-between-parens:
    - 1
    - include: false
    trailing-semicolon: 1
    url-quotes: 1
    variable-for-property:
    - 0
    - properties: []
    variable-name-format:
    - 1
    - allow-leading-underscore: true
    convention: hyphenatedlowercase
    zero-unit: 1
  2. jsnanigans revised this gist Nov 29, 2016. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion Config: .sass-lint.yml
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,11 @@ rules:
    no-important: 0
    no-invalid-hex: 1
    no-mergeable-selectors: 1
    no-misspelled-properties: 1
    no-misspelled-properties:
    - 1
    -
    'extra-properties':
    - 'overflow-scrolling'
    no-qualifying-elements: 1
    no-trailing-whitespace: 1
    no-trailing-zero: 1
  3. jsnanigans revised this gist Nov 29, 2016. 2 changed files with 6 additions and 6 deletions.
    8 changes: 4 additions & 4 deletions .eslintrc.js
    Original file line number Diff line number Diff line change
    @@ -59,8 +59,8 @@ module.exports = {
    "before": true,
    "after": true
    }],
    "key-spacing": [2, {
    "beforeColon": false,
    "key-spacing": [0, {
    "beforeColon": true,
    "afterColon": true
    }],
    "keyword-spacing": [2, {
    @@ -103,7 +103,7 @@ module.exports = {
    "no-labels": 2,
    "no-lone-blocks": 2,
    "no-mixed-spaces-and-tabs": 2,
    "no-multi-spaces": 2,
    "no-multi-spaces": 0,
    "no-multi-str": 2,
    "no-multiple-empty-lines": [1, {
    "max": 10
    @@ -176,4 +176,4 @@ module.exports = {
    "wrap-iife": [2, "any"],
    "yoda": [2, "never"]
    }
    };
    };
    4 changes: 2 additions & 2 deletions Config: .sass-lint.yml
    Original file line number Diff line number Diff line change
    @@ -78,7 +78,7 @@ rules:
    # Inner Spacing
    space-after-comma: 0
    space-before-colon: 0
    space-after-colon: 0
    space-after-colon: 1
    space-before-brace: 0
    space-before-bang: 0
    space-after-bang: 0
    @@ -87,4 +87,4 @@ rules:

    # Final Items
    trailing-semicolon: 1
    final-newline: 0
    final-newline: 0
  4. jsnanigans revised this gist Nov 25, 2016. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions Linting: Getting Started
    Original file line number Diff line number Diff line change
    @@ -29,8 +29,7 @@ Optional:

    for Atom:
    JavaScript
    - install package: eslint-fixer
    - to 'fix' press > [CTRL | COMMAND] + [SHIFT] + [P] < and type in "fix"
    - ctrl+shift+p and find "Linter Eslint: Fix File"
    SCSS
    - install package: atom-beautify
    - configure the atom-beautify > scss settings as you wish
  5. jsnanigans revised this gist Nov 24, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Linting: Getting Started
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Setup:

    install npm modules:
    $ npm install -g eshint sass-lint
    $ npm install -g eslint sass-lint

    for SublimeText:
    install the packages:
  6. jsnanigans revised this gist Nov 24, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion qwe
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    123
  7. jsnanigans revised this gist Nov 24, 2016. 2 changed files with 1 addition and 0 deletions.
    File renamed without changes.
    1 change: 1 addition & 0 deletions qwe
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    123
  8. jsnanigans revised this gist Nov 24, 2016. 3 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
  9. jsnanigans revised this gist Nov 24, 2016. 2 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
  10. jsnanigans revised this gist Nov 24, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Getting Started
    Original file line number Diff line number Diff line change
    @@ -14,9 +14,9 @@ Setup:
    - linter-eslint
    - linter-sass-lint

    In your project directory add there two files:
    .eslintrc.js : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-eslintrc-js
    .sass-lint.yml : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-sass-lint-yml
    In your project directory add there two files (crete files, copy content):
    .eslintrc.js : https://gist.githubusercontent.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5/raw/59f131ee11691969471828c02c0dfa1f4bf1033c/.eslintrc.js
    .sass-lint.yml : https://gist.githubusercontent.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5/raw/59f131ee11691969471828c02c0dfa1f4bf1033c/.sass-lint.yml

    Optional:

  11. jsnanigans revised this gist Nov 24, 2016. 1 changed file with 33 additions and 14 deletions.
    47 changes: 33 additions & 14 deletions Getting Started
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,36 @@
    install npm modules:
    $ npm install -g eshint sass-lint
    Setup:

    for SublimeText:
    install the packages:
    - SublimeLinter
    - SublimeLinter-contrib-sass-lint
    - SublimeLinter-contrib-eslint
    install npm modules:
    $ npm install -g eshint sass-lint

    for Atom:
    intall the packages:
    - linter-eslint
    - linter-sass-lint
    for SublimeText:
    install the packages:
    - SublimeLinter
    - SublimeLinter-contrib-sass-lint
    - SublimeLinter-contrib-eslint

    In your project directory add there two files:
    .eslintrc.js : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-eslintrc-js
    .sass-lint.yml : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-sass-lint-yml
    for Atom:
    intall the packages:
    - linter-eslint
    - linter-sass-lint

    In your project directory add there two files:
    .eslintrc.js : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-eslintrc-js
    .sass-lint.yml : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-sass-lint-yml

    Optional:

    To 'fix' the files file automatically:

    for SublimeText:
    JavaScript
    - install package: ESLint-Formatter
    - add {"format_on_save": true} to your user settings if you want it to run every time you save.

    for Atom:
    JavaScript
    - install package: eslint-fixer
    - to 'fix' press > [CTRL | COMMAND] + [SHIFT] + [P] < and type in "fix"
    SCSS
    - install package: atom-beautify
    - configure the atom-beautify > scss settings as you wish
  12. jsnanigans revised this gist Nov 24, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Getting Started
    Original file line number Diff line number Diff line change
    @@ -12,4 +12,6 @@ intall the packages:
    - linter-eslint
    - linter-sass-lint

    In your project directory add there two files:
    In your project directory add there two files:
    .eslintrc.js : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-eslintrc-js
    .sass-lint.yml : https://gist.github.com/jsnanigans/6042ab9a3443565c7b366499efc9cce5#file-sass-lint-yml
  13. jsnanigans created this gist Nov 24, 2016.
    179 changes: 179 additions & 0 deletions .eslintrc.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,179 @@
    module.exports = {
    "ecmaFeatures": {
    "modules": true,
    "experimentalObjectRestSpread": true
    },

    "env": {
    "browser": false,
    "es6": true,
    "node": true,
    "mocha": true
    },

    "globals": {
    "document": false,
    "navigator": false,
    "window": false,
    "$": false,
    "Modernizr": false,
    "angular": false,
    "Image": false,
    "XMLSerializer": false,
    "getComputedStyle": false,
    "app": false,
    "Gridle": false
    },

    "notused": {

    "handle-callback-err": [2, "^(err|error)$"],
    "indent": [2, 2, {
    "SwitchCase": 1
    }],
    "curly": [2, "multi-line"]

    },

    "rules": {
    "accessor-pairs": 2,
    "arrow-spacing": [2, {
    "before": true,
    "after": true
    }],
    "block-spacing": [2, "always"],
    "brace-style": [2, "1tbs", {
    "allowSingleLine": true
    }],
    "comma-dangle": [2, "always-multiline"],
    "comma-spacing": [2, {
    "before": false,
    "after": true
    }],
    "comma-style": [2, "last"],
    "constructor-super": 2,
    "dot-location": [2, "property"],
    "eol-last": 2,
    "eqeqeq": [2, "allow-null"],
    "generator-star-spacing": [2, {
    "before": true,
    "after": true
    }],
    "key-spacing": [2, {
    "beforeColon": false,
    "afterColon": true
    }],
    "keyword-spacing": [2, {
    "before": true,
    "after": true
    }],
    "new-cap": [2, {
    "newIsCap": true,
    "capIsNew": false
    }],
    "new-parens": 2,
    "no-array-constructor": 2,
    "no-caller": 2,
    "no-class-assign": 2,
    "no-cond-assign": 2,
    "no-const-assign": 2,
    "no-control-regex": 2,
    "no-debugger": 2,
    "no-delete-var": 2,
    "no-dupe-args": 2,
    "no-dupe-class-members": 2,
    "no-dupe-keys": 2,
    "no-duplicate-case": 2,
    "no-empty-character-class": 2,
    "no-eval": 2,
    "no-ex-assign": 2,
    "no-extend-native": 2,
    "no-extra-bind": 2,
    "no-extra-boolean-cast": 2,
    "no-extra-parens": [2, "functions"],
    "no-fallthrough": 2,
    "no-floating-decimal": 2,
    "no-func-assign": 2,
    "no-implied-eval": 2,
    "no-inner-declarations": [2, "functions"],
    "no-invalid-regexp": 2,
    "no-irregular-whitespace": 2,
    "no-iterator": 2,
    "no-label-var": 2,
    "no-labels": 2,
    "no-lone-blocks": 2,
    "no-mixed-spaces-and-tabs": 2,
    "no-multi-spaces": 2,
    "no-multi-str": 2,
    "no-multiple-empty-lines": [1, {
    "max": 10
    }],
    "no-native-reassign": 0,
    "no-negated-in-lhs": 2,
    "no-new": 2,
    "no-new-func": 2,
    "no-new-object": 2,
    "no-new-require": 2,
    "no-new-wrappers": 2,
    "no-obj-calls": 2,
    "no-octal": 2,
    "no-octal-escape": 2,
    "no-proto": 0,
    "no-redeclare": 2,
    "no-regex-spaces": 2,
    "no-return-assign": 2,
    "no-self-compare": 2,
    "no-sequences": 2,
    "no-shadow-restricted-names": 2,
    "no-spaced-func": 2,
    "no-sparse-arrays": 2,
    "no-this-before-super": 2,
    "no-throw-literal": 2,
    "no-trailing-spaces": 0,
    "no-undef": 2,
    "no-undef-init": 2,
    "no-unexpected-multiline": 2,
    "no-unneeded-ternary": [2, {
    "defaultAssignment": false
    }],
    "no-unreachable": 2,
    "no-unused-vars": [2, {
    "vars": "all",
    "args": "none"
    }],
    "no-useless-call": 0,
    "no-with": 2,
    "one-var": [0, {
    "initialized": "never"
    }],
    "operator-linebreak": [0, "after", {
    "overrides": {
    "?": "before",
    ":": "before"
    }
    }],
    "padded-blocks": [0, "never"],
    "quotes": [2, "single", "avoid-escape"],
    "radix": 2,
    "semi": [2, "always"],
    "semi-spacing": [2, {
    "before": false,
    "after": true
    }],
    "space-before-blocks": [2, "always"],
    "space-before-function-paren": [2, "never"],
    "space-in-parens": [2, "never"],
    "space-infix-ops": 2,
    "space-unary-ops": [2, {
    "words": true,
    "nonwords": false
    }],
    "spaced-comment": [0, "always", {
    "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","]
    }],
    "use-isnan": 2,
    "valid-typeof": 2,
    "wrap-iife": [2, "any"],
    "yoda": [2, "never"]
    }
    };
    90 changes: 90 additions & 0 deletions .sass-lint.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,90 @@
    options:
    formatter: stylish
    files:
    include: '**/*.s+(a|c)ss'
    rules:
    # Extends
    extends-before-mixins: 1
    extends-before-declarations: 1
    placeholder-in-extend: 0

    # Mixins
    mixins-before-declarations: 0

    # Line Spacing
    one-declaration-per-line: 0
    empty-line-between-blocks: 0
    single-line-per-selector: 0

    # Disallows
    no-attribute-selectors: 0
    no-color-keywords: 0
    no-color-literals: 0
    no-combinators: 0
    no-css-comments: 1
    no-debug: 1
    no-disallowed-properties: 0
    no-duplicate-properties: 1
    no-empty-rulesets: 1
    no-extends: 0
    no-ids: 1
    no-important: 0
    no-invalid-hex: 1
    no-mergeable-selectors: 1
    no-misspelled-properties: 1
    no-qualifying-elements: 1
    no-trailing-whitespace: 1
    no-trailing-zero: 1
    no-transition-all: 1
    no-universal-selectors: 0
    no-url-protocols: 1
    no-vendor-prefixes: 0
    no-warn: 1
    property-units: 0

    # Nesting
    force-attribute-nesting: 1
    force-element-nesting: 1
    force-pseudo-nesting: 1

    # Name Formats
    class-name-format: 0
    function-name-format: 0
    id-name-format: 0
    mixin-name-format: 0
    placeholder-name-format: 0
    variable-name-format: 0

    # Style Guide
    attribute-quotes: 1
    bem-depth: 0
    border-zero: 1
    brace-style: 1
    clean-import-paths: 1
    empty-args: 0
    hex-length: 1
    hex-notation: 1
    indentation: 0
    leading-zero: 0
    nesting-depth: 0
    property-sort-order: 0
    pseudo-element: 0
    quotes: 1
    shorthand-values: 1
    url-quotes: 0
    variable-for-property: 1
    zero-unit: 1

    # Inner Spacing
    space-after-comma: 0
    space-before-colon: 0
    space-after-colon: 0
    space-before-brace: 0
    space-before-bang: 0
    space-after-bang: 0
    space-between-parens: 0
    space-around-operator: 0

    # Final Items
    trailing-semicolon: 1
    final-newline: 0
    15 changes: 15 additions & 0 deletions Getting Started
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    install npm modules:
    $ npm install -g eshint sass-lint

    for SublimeText:
    install the packages:
    - SublimeLinter
    - SublimeLinter-contrib-sass-lint
    - SublimeLinter-contrib-eslint

    for Atom:
    intall the packages:
    - linter-eslint
    - linter-sass-lint

    In your project directory add there two files: