fairmanager-cordova-plugin-localization-strings
Version:
Cordova Plugin for handling localization strings on InfoPlist.strings and Localizable.strings on iOS, strings.xml on Android
686 lines (685 loc) • 19.4 kB
Plain Text
{
"root": true,
"env": {
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"rules": {
// =================================================
// ==== Possible Errors
// =================================================
// disallow await inside of loops
"no-await-in-loop": 0,
// disallow comparing against -0
"no-compare-neg-zero": 2,
// disallow empty block statements
"no-empty": [
2,
{
"allowEmptyCatch": true
}
],
// disallow unnecessary parentheses
"no-extra-parens": 0,
// disallow calling some Object.prototype methods directly on objects
"no-prototype-builtins": 2,
// disallow template literal placeholder syntax in regular strings
"no-template-curly-in-string": 2,
// disallow negating the left operand of relational operators
"no-unsafe-negation": 2,
// enforce valid JSDoc comments
"valid-jsdoc": 0,
// =================================================
// ==== Best Practice
// =================================================
// enforce getter and setter pairs in objects
"accessor-pairs": 0,
// enforce return statements in callbacks of array methods
"array-callback-return": 2,
// enforce the use of variables within the scope they are defined
"block-scoped-var": 2,
// enforce that class methods utilize this
"class-methods-use-this": 0,
// enforce a maximum cyclomatic complexity allowed in a program
"complexity": 0,
// require return statements to either always or never specify values
"consistent-return": 1,
// enforce consistent brace style for all control statements
"curly": [
2,
"all"
],
// require default cases in switch statements
"default-case": 0,
// enforce consistent newlines before and after dots
"dot-location": [
2,
"property"
],
// enforce dot notation whenever possible
"dot-notation": 2,
// require the use of === and !==
"eqeqeq": 2,
// require for-in loops to include an if statement
"guard-for-in": 0,
// disallow the use of alert, confirm, and prompt
"no-alert": 2,
// disallow the use of arguments.caller or arguments.callee
"no-caller": 2,
// disallow division operators explicitly at the beginning of regular expressions
"no-div-regex": 0,
// disallow else blocks after return statements in if statements
"no-else-return": 0,
// disallow empty functions
"no-empty-function": 2,
// disallow null comparisons without type-checking operators
"no-eq-null": 2,
// disallow the use of eval()
"no-eval": 2,
// disallow extending native types
"no-extend-native": 2,
// disallow unnecessary calls to .bind()
"no-extra-bind": 2,
// disallow unnecessary labels
"no-extra-label": 2,
// disallow leading or trailing decimal points in numeric literals
"no-floating-decimal": 2,
// disallow shorthand type conversions
"no-implicit-coercion": 2,
// disallow variable and function declarations in the global scope
"no-implicit-globals": 0,
// disallow the use of eval()-like methods
"no-implied-eval": 2,
// disallow this keywords outside of classes or class-like objects
"no-invalid-this": 2,
// disallow the use of the __iterator__ property
"no-iterator": 2,
// disallow labeled statements
"no-labels": 2,
// disallow unnecessary nested blocks
"no-lone-blocks": 2,
// disallow function declarations and expressions inside loop statements
"no-loop-func": 2,
// disallow magic numbers
"no-magic-numbers": "off",
// disallow multiple spaces
"no-multi-spaces": [
2,
{
"exceptions": {
"Property": true,
"VariableDeclarator": true,
"AssignmentExpression": true
}
}
],
// disallow multiline strings
"no-multi-str": 2,
// disallow new operators outside of assignments or comparisons
"no-new": 0,
// disallow new operators with the Function object
"no-new-func": 0,
// disallow new operators with the String, Number, and Boolean objects
"no-new-wrappers": 0,
// disallow octal escape sequences in string literals
"no-octal-escape": 2,
// disallow reassigning function parameters
"no-param-reassign": 0,
// disallow the use of the __proto__ property
"no-proto": 0,
// disallow assignment operators in return statements
"no-return-assign": 0,
// disallow unnecessary return await
"no-return-await": 2,
// disallow javascript: urls
"no-script-url": 2,
// disallow comparisons where both sides are exactly the same
"no-self-compare": 2,
// disallow comma operators
"no-sequences": 2,
// disallow throwing literals as exceptions
"no-throw-literal": 2,
// disallow unmodified loop conditions
"no-unmodified-loop-condition": 1,
// disallow unused expressions
"no-unused-expressions": 2,
// disallow unnecessary calls to .call() and .apply()
"no-useless-call": 2,
// disallow unnecessary concatenation of literals or template literals
"no-useless-concat": 2,
// disallow unnecessary escape characters
"no-useless-escape": 2,
// disallow redundant return statements
"no-useless-return": 2,
// disallow void operators
"no-void": 2,
// disallow specified warning terms in comments
"no-warning-comments": 0,
// disallow with statements
"no-with": 2,
// require using Error objects as Promise rejection reasons
"prefer-promise-reject-errors": 2,
// enforce the consistent use of the radix argument when using parseInt()
"radix": [
2,
"as-needed"
],
// disallow async functions which have no await expression
"require-await": 2,
// require var declarations be placed at the top of their containing scope
"vars-on-top": 0,
// require parentheses around immediate function invocations
"wrap-iife": 2,
// require or disallow “Yoda” conditions
"yoda": 0,
// =================================================
// ==== Variables
// =================================================
// require or disallow initialization in variable declarations
"init-declarations": [
2,
"always"
],
// disallow catch clause parameters from shadowing variables in the outer scope
"no-catch-shadow": 0,
// disallow labels that share a name with a variable
"no-label-var": 2,
// disallow specified global variables
"no-restricted-globals": 0,
// disallow variable declarations from shadowing variables declared in the outer scope
"no-shadow": 2,
// disallow identifiers from shadowing restricted names
"no-shadow-restricted-names": 2,
// disallow initializing variables to undefined
"no-undef-init": 2,
// disallow the use of undefined as an identifier
"no-undefined": 0,
// disallow unused variables
"no-unused-vars": [
1,
{
"args": "none",
"argsIgnorePattern": "error|request|response",
"vars": "all"
}
],
// disallow the use of variables before they are defined
"no-use-before-define": [
2,
{
"functions": false,
"classes": true,
"variables": true
}
],
// =================================================
// ==== Node.js & CommonJS
// =================================================
// require return statements after callbacks
"callback-return": 0,
// require require() calls to be placed at top-level module scope
"global-require": 0,
// require error handling in callbacks
"handle-callback-err": 0,
// disallow require calls to be mixed with regular variable declarations
"no-mixed-requires": 0,
// disallow new operators with calls to require
"no-new-require": 0,
// disallow string concatenation with __dirname and __filename
"no-path-concat": 0,
// disallow the use of process.env
"no-process-env": 0,
// disallow the use of process.exit()
"no-process-exit": 0,
// disallow specified modules when loaded by require
"no-restricted-modules": 0,
// disallow synchronous methods
"no-sync": 0,
// =================================================
// ==== Stylistic Issues
// =================================================
// enforce consistent spacing inside array brackets
"array-bracket-spacing": [
2,
"always"
],
// enforce consistent spacing inside single-line blocks
"block-spacing": 2,
// enforce consistent brace style for blocks
"brace-style": [
2,
"1tbs",
{
"allowSingleLine": false
}
],
// enforce camelcase naming convention
"camelcase": [
2,
{
"properties": "always"
}
],
// enforce or disallow capitalization of the first letter of a comment
"capitalized-comments": 0,
// require or disallow trailing commas
"comma-dangle": [
2,
"never"
],
// enforce consistent spacing before and after commas
"comma-spacing": [
2,
{
"after": true,
"before": false
}
],
// enforce consistent comma style
"comma-style": [
2,
"last"
],
// enforce consistent spacing inside computed property brackets
"computed-property-spacing": [
2,
"always"
],
// enforce consistent naming when capturing the current execution context
"consistent-this": 0,
// require or disallow newline at the end of files
"eol-last": 2,
// require or disallow spacing between function identifiers and their invocations
"func-call-spacing": [
2,
"never"
],
// require function names to match the name of the variable or property to which they are assigned
"func-name-matching": 0,
// require or disallow named function expressions
"func-names": 2,
// enforce the consistent use of either function declarations or expressions
"func-style": [
2,
"declaration",
{
"allowArrowFunctions": true
}
],
// disallow specified identifiers
"id-blacklist": 0,
// enforce minimum and maximum identifier lengths
"id-length": 0,
// require identifiers to match a specified regular expression
"id-match": 0,
// enforce consistent indentation
"indent": [
2,
"tab",
{
"SwitchCase": 1
}
],
// enforce the consistent use of either double or single quotes in JSX attributes
"jsx-qoutes": 0,
// enforce consistent spacing between keys and values in object literal properties
"key-spacing": [
2,
{
"beforeColon": true,
"afterColon": true,
"mode": "minimum"
}
],
// enforce consistent spacing before and after keywords
"keyword-spacing": [
2,
{
"before": true,
"after": false,
"overrides": {
"case": {
"before": false,
"after": true
},
"const": {
"before": false,
"after": true
},
"do": {
"before": false,
"after": true
},
"else": {
"before": true,
"after": true
},
"let": {
"before": false,
"after": true
},
"return": {
"before": false,
"after": true
},
"try": {
"before": false,
"after": true
}
}
}
],
// enforce position of line comments
"line-comment-position": [
"error",
{
"position": "above"
}
],
// enforce consistent linebreak style
"linebreak-style": [
2,
"unix"
],
// require empty lines around comments
"lines-around-comment": [
2,
{
"beforeBlockComment": true,
"allowBlockStart": true,
"allowObjectStart": true,
"allowArrayStart": true
}
],
// require or disallow newlines around directives
"lines-around-directive": 0,
// enforce a maximum depth that blocks can be nested
"max-depth": 0,
// enforce a maximum line length
"max-len": 0,
// enforce a maximum number of lines per file
"max-lines": 0,
// enforce a maximum depth that callbacks can be nested
"max-nested-callbacks": 0,
// enforce a maximum number of parameters in function definitions
"max-params": 0,
// enforce a maximum number of statements allowed in function blocks
"max-statements": 0,
// enforce a maximum number of statements allowed per line
"max-statements-per-line": [
2,
{
"max": 1
}
],
// enforce newlines between operands of ternary expressions
"multiline-ternary": 0,
// require constructor names to begin with a capital letter
"new-cap": 2,
// require parentheses when invoking a constructor with no arguments
"new-parens": 2,
// require or disallow an empty line after variable declarations
"newline-after-var": 0,
// require an empty line before return statements
"newline-before-return": 0,
// require a newline after each call in a method chain
"newline-per-chained-call": 2,
// disallow Array constructors
"no-array-constructor": 0,
// disallow bitwise operators
"no-bitwise": 1,
// disallow continue statements
"no-continue": 0,
// disallow inline comments after code
"no-inline-comments": 0,
// disallow if statements as the only statement in else blocks
"no-lonely-if": 2,
// disallow mixed binary operators
"no-mixed-operators": 0,
// disallow mixed spaces and tabs for indentation
"no-mixed-spaces-and-tabs": [
2,
"smart-tabs"
],
// disallow use of chained assignment expressions
"no-multi-assign": 2,
// disallow multiple empty lines
"no-multiple-empty-lines": [
2,
{
"max": 2,
"maxEOF": 1,
"maxBOF": 0
}
],
// disallow negated conditions
"no-negated-condition": 0,
// disallow nested ternary expressions
"no-nested-ternary": 2,
// disallow Object constructors
"no-new-object": 2,
// disallow the unary operators ++ and --
"no-plusplus": 0,
// disallow specified syntax
"no-restricted-syntax": 0,
// disallow all tabs
"no-tabs": 0,
// disallow ternary operators
"no-ternary": 0,
// disallow trailing whitespace at the end of lines
"no-trailing-spaces": 2,
// disallow dangling underscores in identifiers
"no-underscore-dangle": 0,
// disallow ternary operators when simpler alternatives exist
"no-unneeded-ternary": 0,
// disallow whitespace before properties
"no-whitespace-before-property": 2,
// enforce the location of single-line statements
"nonblock-statement-body-position": 0,
// enforce consistent line breaks inside braces
"object-curly-newline": [
2,
{
"minProperties": 1
}
],
// enforce consistent spacing inside braces
"object-curly-spacing": [
2,
"always",
{
"arraysInObjects": false,
"objectsInObjects": false
}
],
// enforce placing object properties on separate lines
"object-property-newline": 2,
// enforce variables to be declared either together or separately in functions
"one-var": [
2,
"never"
],
// require or disallow newlines around variable declarations
"one-var-declaration-per-line": [
2,
"always"
],
// require or disallow assignment operator shorthand where possible
"operator-assignment": 0,
// enforce consistent linebreak style for operators
"operator-linebreak": [
2,
"after"
],
// require or disallow padding within blocks
"padded-blocks": 0,
// require quotes around object literal property name
"quote-props": [
2,
"as-needed"
],
// enforce the consistent use of either backticks, double, or single quotes
"quotes": [
2,
"double",
{
"allowTemplateLiterals": true
}
],
// require JSDoc comments
"require-jsdoc": 0,
// require or disallow semicolons instead of ASI
"semi": [
2,
"always"
],
// enforce consistent spacing before and after semicolons
"semi-spacing": [
2,
{
"before": false,
"after": true
}
],
// require object keys to be sorted
"sort-keys": 0,
// require variables within the same declaration block to be sorted
"sort-vars": 0,
// enforce consistent spacing before blocks
"space-before-blocks": [
2,
"always"
],
// enforce consistent spacing before function definition opening parenthesis
"space-before-function-paren": [
2,
"never"
],
// enforce consistent spacing inside parentheses
"space-in-parens": [
2,
"always"
],
// require spacing around infix operators
"space-infix-ops": 2,
// enforce consistent spacing before or after unary operators
"space-unary-ops": [
2,
{
"words": false,
"nonwords": false
}
],
// enforce consistent spacing after the // or /* in a commen
"spaced-comment": [
2,
"always"
],
// require or disallow spacing between template tags and their literals
"template-tag-spacing": [
2,
"never"
],
// require or disallow Unicode byte order mark (BOM)
"unicode-bom": 0,
// require parenthesis around regex literals
"wrap-regex": 0,
// =================================================
// ==== ECMAScript 6
// =================================================
// require braces around arrow function bodies
"arrow-body-style": [
1,
"as-needed"
],
// require parentheses around arrow function arguments
"arrow-parens": [
2,
"as-needed"
],
// enforce consistent spacing before and after the arrow in arrow functions
"arrow-spacing": [
2,
{
"after": true,
"before": true
}
],
// enforce consistent spacing around * operators in generator functions
"generator-star-spacing": 0,
// disallow arrow functions where they could be confused with comparisons
"no-confusing-arrow": 0,
// disallow duplicate module imports
"no-duplicate-imports": 2,
// disallow specified modules when loaded by import
"no-restricted-imports": 0,
// disallow unnecessary computed property keys in object literals
"no-useless-computed-key": 2,
// disallow unnecessary constructors
"no-useless-constructor": 2,
// disallow renaming import, export, and destructured assignments to the same name
"no-useless-rename": 2,
// require let or const instead of var
"no-var": 2,
// require or disallow method and property shorthand syntax for object literals
"object-shorthand": 0,
// require arrow functions as callbacks
"prefer-arrow-callback": 1,
// require const declarations for variables that are never reassigned after declared
"prefer-const": 2,
// require destructuring from arrays and/or objects
"prefer-destructuring": 0,
// disallow parseInt() in favor of binary, octal, and hexadecimal literals
"prefer-numeric-literals": 0,
// require rest parameters instead of arguments
"prefer-rest-params": 2,
// require spread operators instead of .apply()
"prefer-spread": 2,
// require template literals instead of string concatenation
"prefer-template": 2,
// enforce spacing between rest and spread operators and their expressions
"rest-spread-spacing": [
2,
"never"
],
// enforce sorted import declarations within modules
"sort-imports": [
2,
{
"ignoreCase": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": [
"none",
"all",
"multiple",
"single"
]
}
],
// require symbol descriptions
"symbol-description": 0,
// require or disallow spacing around embedded expressions of template strings
"template-curly-spacing": [
2,
"never"
],
// require or disallow spacing around the * in yield* expressions
"yield-star-spacing": [
2,
"after"
],
"promise/always-return": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/catch-or-return": "error",
"promise/no-native": "error",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"promise/avoid-new": "warn"
},
"plugins": [
"promise"
]
}