Skip to content

Commit

Permalink
Updated lint version.
Browse files Browse the repository at this point in the history
  • Loading branch information
joselrio committed Aug 29, 2023
1 parent 5dcb618 commit 0d2df59
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 48 deletions.
112 changes: 74 additions & 38 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,96 +8,129 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12
},
"plugins": ["@typescript-eslint", "prettier"],
"plugins": [
"@typescript-eslint",
"prettier"
],
"rules": {
"@typescript-eslint/member-ordering": [
"warn",
{
"default": {
"memberTypes": [
"signature",
"field",
"signature",
"field",
"method"
],
],
"order": "alphabetically"
},
"interfaces": {
"memberTypes": [
"signature",
"field",
"field",
"method"
],
"order": "alphabetically"
},
"classes": {
"memberTypes": [
"signature",
"private-field",
"signature",
"private-field",
"protected-field",
"public-field",
"constructor",
"private-method",
"protected-method",
"public-method",
"public-field",
"constructor",
"private-method",
"protected-method",
"public-method",
"abstract-method"
],
],
"order": "alphabetically"
}
}
}
],
"@typescript-eslint/explicit-member-accessibility": [
"warn",
{
"ignoredMethodNames": ["constructor"]
"ignoredMethodNames": [
"constructor"
]
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "function",
"format": ["StrictPascalCase"],
"modifiers": ["exported"]
"format": [
"StrictPascalCase"
],
"modifiers": [
"exported"
]
},
{
"selector": "class",
"format": ["StrictPascalCase"]
"selector": "class",
"format": [
"StrictPascalCase"
]
},
{
"selector": "classProperty",
"format": ["strictCamelCase"],
"format": [
"strictCamelCase"
],
"leadingUnderscore": "require",
"modifiers": ["private"]
"modifiers": [
"private"
]
},
{
"selector": "classProperty",
"format": ["strictCamelCase"],
"format": [
"strictCamelCase"
],
"leadingUnderscore": "forbid",
"modifiers": ["public", "protected"]
"modifiers": [
"public",
"protected"
]
},
{
"selector": "classMethod",
"format": ["strictCamelCase"],
"format": [
"strictCamelCase"
],
"leadingUnderscore": "require",
"modifiers": ["private"]
"modifiers": [
"private"
]
},
{
"selector": "classMethod",
"format": ["strictCamelCase"],
"format": [
"strictCamelCase"
],
"leadingUnderscore": "forbid",
"modifiers": ["public", "protected"]
"modifiers": [
"public",
"protected"
]
},
{
"selector": "interface",
"format": ["UPPER_CASE", "StrictPascalCase"],
"prefix": ["I"]
}
"format": [
"UPPER_CASE",
"StrictPascalCase"
],
"prefix": [
"I"
]
}
],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-namespace": "off",
Expand All @@ -110,10 +143,10 @@
"no-extend-native": "error",
"no-inner-declarations": "off",
"no-multiple-empty-lines": [
"warn",
{
"max": 1,
"maxEOF": 0
"warn",
{
"max": 1,
"maxEOF": 0
}
],
"no-template-curly-in-string": "warn",
Expand All @@ -122,12 +155,15 @@
"no-prototype-builtins": "off",
//"no-use-before-define": "error",
"no-var": "error",
"one-var": ["warn", "never"],
"one-var": [
"warn",
"never"
],
//"quotes": ["error", "single"], //ecaping quotes on prettier https://github.com/prettier/prettier/issues/973
"semi": [
"error",
"always"
],
"yoda": "warn"
}
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "OutSystems UI Framework",
"license": "BSD-3-Clause",
"scripts": {
"build": "gulp createProduction && npm run lint",
"build": "gulp createProduction && npm run lintfix && npm run lint",
"create-osui-scss": "gulp updateScssFile",
"dev": "gulp startDevelopment",
"docs": "npx typedoc",
Expand Down Expand Up @@ -36,9 +36,9 @@
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"browser-sync": "^2.27.11",
"eslint": "^7.26.0",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint": "^8.47.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"fancy-log": "^2.0.0",
"flatpickr": "^4.6.13",
"gulp": "^4.0.2",
Expand Down
6 changes: 2 additions & 4 deletions src/scripts/OutSystems/OSUI/Utils/HideOnScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ namespace OutSystems.OSUI.Utils.HideOnScroll {

if (OSFramework.OSUI.Helper.Dom.Styles.ContainsClass(header, 'hide') && content) {
let startY = 0;
const mainContentHeight: number = OSFramework.OSUI.Helper.Dom.ClassSelector(
document.body,
'main-content'
)?.scrollHeight;
const mainContentHeight: number = OSFramework.OSUI.Helper.Dom.ClassSelector(document.body, 'main-content')
?.scrollHeight;

const threshold = 60;
const layout = OSFramework.OSUI.Helper.Dom.ClassSelector(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ namespace Providers.OSUI.Dropdown.VirtualSelect {
previousValue[group_name].push(option);

return previousValue;
},
{});
}, {});
return [hasDescription, groupOptionsObject];
}

Expand Down

0 comments on commit 0d2df59

Please sign in to comment.