UNPKG

nanakshahi

Version:

A JavaScript Library to get Nanakshahi Dates and Gurpurabs

106 lines (105 loc) 3.25 kB
{ "parser": "@babel/eslint-parser", "parserOptions": { "requireConfigFile": false }, "extends": "airbnb-base", "root": true, "env": { "es6": true, "jest/globals": true }, "plugins": ["jest", "require-sort"], "rules": { // Spacing in brackets is consistent and readable "array-bracket-spacing": ["error", "always"], // Spacing in brackets is consistent and readable "computed-property-spacing": ["error", "always"], // Allow clean function parens "arrow-parens": [ "error", "as-needed", { "requireForBlockBody": false } ], // Spacing in brackets is consistent and readable "space-in-parens": [ "error", "always", { "exceptions": ["empty"] } ], // Doesn't really help to check if the module is on the filesystem, and can harm when using Docker etc: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md "import/no-unresolved": "off", // Do not require .js/ts extensions, except for .json "import/extensions": [ "error", "never", { "json": "always" } ], // Preferable, but the author should know best for the situation "import/prefer-default-export": "off", // Windows users may checkout as CRLF, but check in as LF, which this rule breaks "linebreak-style": "off", // There's no need to have more than 1 empty line, ever "no-multiple-empty-lines": [ "error", { "max": 1 } ], // Allow nested ternary "no-nested-ternary": "off", // No unused variables except when prepended with _, to indicate that they're not to be used, but require definition to be valid code "no-unused-vars": [ "error", { "ignoreRestSiblings": true, "argsIgnorePattern": "^_" } ], // https://eslint.org/docs/rules/no-shadow seems sensible to not have shadow variables, but can get annoying real quick, especially in the case of reducers "no-shadow": "off", // Be consistent about where the object braces go "object-curly-newline": [ "error", { "consistent": true } ], // Object properties either on the same line, or all on separate, consistently "object-property-newline": [ "error", { "allowAllPropertiesOnSameLine": true } ], // Semi colons are visual garbage "semi": ["error", "never"], // For the few semi-colons required (e.g. inline array operations), place them at the beginning of the statement "semi-style": ["error", "first"], // This plugin sorts alphabetically by default "require-sort/require-sort": [ "error", { "ignoreCase": false, "ignoreDeclarationSort": false, "ignorePropertySort": false, "propertySyntaxSortOrder": ["none", "single", "multiple"] } ], // Add new line between imports "import/order": "off", "sort-imports": "off", "jest/no-disabled-tests": "warn", "jest/no-focused-tests": "error", "jest/no-identical-title": "error", "jest/prefer-to-have-length": "warn", "jest/valid-expect": "error", "default-param-last": "off" } }