Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ignore chronic_duration.js from eslint

Aaron Contreras2df21d828112
diff --git a/frontend/.eslintignore b/frontend/.eslintignore
index 1c7abcc8fb9..97b5851b707 100644
--- a/frontend/.eslintignore
+++ b/frontend/.eslintignore
@@ -1,2 +1,3 @@
.eslintrc.js
-vendor
\ No newline at end of file
+vendor
+src/app/shared/helpers/chronic_duration.js
diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js
index 0481eb6edfc..79d2b879695 100644
--- a/frontend/.eslintrc.js
+++ b/frontend/.eslintrc.js
@@ -25,7 +25,7 @@ module.exports = {
project: "./src/tsconfig.app.json",
tsconfigRootDir: __dirname,
sourceType: "module",
- createDefaultProgram: true
+ createDefaultProgram: true,
},
extends: [
"plugin:@typescript-eslint/recommended",
@@ -49,11 +49,10 @@ module.exports = {
"error",
{"type": "element", "prefix": ["op", "opce"], "style": "kebab-case"},
],
- "@angular-eslint/component-class-suffix": ["error", { "suffixes": ["Component", "Example"] }],
+ "@angular-eslint/component-class-suffix": ["error", {"suffixes": ["Component", "Example"]}],
// Warn when new components are being created without OnPush
"change-detection-strategy/on-push": "error",
-
"no-console": [
"error",
{
@@ -65,8 +64,8 @@ module.exports = {
],
// Sometimes we need to shush the TypeScript compiler
- "no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
- "@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
+ "no-unused-vars": ["error", {"varsIgnorePattern": "^_", "argsIgnorePattern": "^_"}],
+ "@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_", "argsIgnorePattern": "^_"}],
// Who cares about line length
"max-len": "off",
@@ -75,11 +74,11 @@ module.exports = {
"object-curly-newline": "off",
// Allow short circuit evaluations
- "@typescript-eslint/no-unused-expressions": ["error", { "allowShortCircuit": true }],
+ "@typescript-eslint/no-unused-expressions": ["error", {"allowShortCircuit": true}],
// Force single quotes to align with ruby
quotes: "off",
- "@typescript-eslint/quotes": ["error", "single", { avoidEscape: true }],
+ "@typescript-eslint/quotes": ["error", "single", {avoidEscape: true}],
// Disable webpack loader definitions
"import/no-webpack-loader-syntax": "off",
@@ -103,14 +102,14 @@ module.exports = {
// No void at all collides with `@typescript-eslint/no-floating-promises` which wants us to handle each promise.
// Until we do that, `void` is a good way to explicitly mark unhandled promises.
- "no-void": ["error", { allowAsStatement: true }],
+ "no-void": ["error", {allowAsStatement: true}],
// Disable no-use for functions and classes
- "no-use-before-define": ["error", { "functions": false, "classes": false }],
- "@typescript-eslint/no-use-before-define": ["error", { "functions": false, "classes": false }],
+ "no-use-before-define": ["error", {"functions": false, "classes": false}],
+ "@typescript-eslint/no-use-before-define": ["error", {"functions": false, "classes": false}],
// Allow subsequent single fields in typescript classes
- "@typescript-eslint/lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
+ "@typescript-eslint/lines-between-class-members": ["error", "always", {"exceptAfterSingleLine": true}],
// Disable indentation rule as it breaks in edge cases and is covered by editorconfig
"indent": "off",
@@ -162,14 +161,14 @@ module.exports = {
allowAfterThisConstructor: false,
enforceInMethodNames: true,
allowFunctionParams: true,
- }
+ },
],
"no-return-assign": ["error", "except-parens"],
- "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
+ "no-plusplus": ["error", {"allowForLoopAfterthoughts": true}],
// https://typescript-eslint.io/rules/no-base-to-string/ Disable false positives due to missing types
- "@typescript-eslint/no-base-to-string": ["error", { "ignoredTypeNames": ["URI", "Error", "RegExp", "URL", "URLSearchParams"] }],
+ "@typescript-eslint/no-base-to-string": ["error", {"ignoredTypeNames": ["URI", "Error", "RegExp", "URL", "URLSearchParams"]}],
//////////////////////////////////////////////////////////////////////
// Anything below this line should be turned on again at some point //
@@ -177,13 +176,12 @@ module.exports = {
// It's common in Angular to wrap even pure functions in classes for injection purposes
"class-methods-use-this": "off",
- }
+ },
},
{
files: ["*.html"],
extends: ["plugin:@angular-eslint/template/recommended"],
- rules: {
- }
+ rules: {},
},
{
files: ["*.spec.ts"],
@@ -200,7 +198,7 @@ module.exports = {
// Allow more than one class definitions per file (test components)
"max-classes-per-file": "off",
- }
- }
+ },
+ },
],
};