2019-02-08 16:06:25 +03:00
|
|
|
'use strict';
|
|
|
|
|
2019-02-08 15:56:50 +03:00
|
|
|
module.exports = {
|
|
|
|
env: {
|
|
|
|
'browser': true,
|
|
|
|
'jasmine': true
|
|
|
|
},
|
|
|
|
extends: 'eslint:recommended',
|
|
|
|
rules: {
|
|
|
|
// Require strict mode directive in top level functions
|
|
|
|
// https://eslint.org/docs/rules/strict
|
2019-02-11 17:02:55 +03:00
|
|
|
'strict': ['error', 'function'],
|
2019-02-08 15:56:50 +03:00
|
|
|
|
|
|
|
// This option sets a specific tab width for your code
|
|
|
|
// https://eslint.org/docs/rules/indent
|
|
|
|
'indent': ['error', 4],
|
|
|
|
|
|
|
|
// Disallow mixed 'LF' and 'CRLF' as linebreaks
|
|
|
|
// https://eslint.org/docs/rules/linebreak-style
|
|
|
|
'linebreak-style': ['error', 'unix'],
|
|
|
|
|
|
|
|
// Specify whether double or single quotes should be used
|
2019-02-11 17:02:55 +03:00
|
|
|
'quotes': ['error', 'single'],
|
2019-02-08 15:56:50 +03:00
|
|
|
|
|
|
|
// Require or disallow use of semicolons instead of ASI
|
|
|
|
'semi': ['error', 'always'],
|
|
|
|
|
|
|
|
// Enforce location of semicolons
|
|
|
|
// https://eslint.org/docs/rules/semi-style
|
|
|
|
'semi-style': ['error', 'last'],
|
|
|
|
|
|
|
|
// Require camel case names
|
|
|
|
// https://eslint.org/docs/rules/camelcase
|
|
|
|
'camelcase': ['error', { 'properties': 'always' }],
|
|
|
|
|
|
|
|
// Require curly brace conventions
|
|
|
|
// https://eslint.org/docs/rules/curly
|
|
|
|
'curly': 'error',
|
|
|
|
|
|
|
|
// Use type-safe equality operators
|
|
|
|
// https://eslint.org/docs/rules/eqeqeq
|
|
|
|
'eqeqeq': ['error', 'always'],
|
|
|
|
|
|
|
|
// Treat var statements as if they were block scoped
|
|
|
|
// https://eslint.org/docs/rules/block-scoped-var
|
|
|
|
'block-scoped-var': 'error',
|
|
|
|
|
|
|
|
// Require newlines around variable declarations
|
|
|
|
// https://eslint.org/docs/rules/one-var-declaration-per-line
|
|
|
|
'one-var-declaration-per-line': ['error', 'always'],
|
|
|
|
|
|
|
|
// Require constructor names to begin with a capital letter
|
|
|
|
// https://eslint.org/docs/rules/new-cap
|
|
|
|
'new-cap': 'error',
|
|
|
|
|
|
|
|
// Disallow Use of alert, confirm, prompt
|
|
|
|
// https://eslint.org/docs/rules/no-alert
|
|
|
|
'no-alert': 'error',
|
|
|
|
|
|
|
|
// Disallow eval()
|
|
|
|
// https://eslint.org/docs/rules/no-eval
|
|
|
|
'no-eval': 'error',
|
|
|
|
|
2019-02-11 17:02:55 +03:00
|
|
|
// Disallow empty functions
|
2019-02-08 15:56:50 +03:00
|
|
|
// https://eslint.org/docs/rules/no-empty-function
|
|
|
|
'no-empty-function': 'error',
|
|
|
|
|
|
|
|
// Require radix parameter
|
|
|
|
// https://eslint.org/docs/rules/radix
|
|
|
|
'radix': 'error'
|
|
|
|
},
|
|
|
|
globals: {
|
|
|
|
'Mzp': true,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|