add eslint

This commit is contained in:
tykayn 2020-04-13 10:59:25 +02:00
parent e2c388da9e
commit e56d5cdcef
5 changed files with 1762 additions and 2094 deletions

14
.eslintrc.js Normal file
View File

@ -0,0 +1,14 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
},
};

12
.prettierrc.js Normal file
View File

@ -0,0 +1,12 @@
module.exports = {
parser : '@typescript-eslint/parser', // Specifies the ESLint parser
extends : [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'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 displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType : 'module', // Allows for the use of imports
},
};

3818
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,15 +31,20 @@
"@angular/platform-browser-dynamic": "~9.0.0",
"@angular/router": "~9.0.0",
"@fullcalendar/core": "^4.3.1",
"@ngx-translate/core": "^12.0.0",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"angular-date-value-accessor": "^0.0.2",
"bulma": "^0.8.2",
"chart.js": "^2.8.0",
"eslint": "^6.8.0",
"font-awesome": "^4.7.0",
"husky": "^4.2.5",
"karma-coverage": "^2.0.1",
"karma-firefox-launcher": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"lint-staged": "^10.1.3",
"ngx-clipboard": "^12.3.0",
"ngx-markdown": "^8.2.2",
"ngx-toaster": "^1.0.1",
@ -70,14 +75,14 @@
"compodoc": "^0.0.41",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.4.1",
"karma": "^5.0.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.1",
"karma-jasmine": "~3.1.0",
"karma-jasmine-html-reporter": "^1.5.2",
"protractor": "~5.4.3",
"ts-node": "~8.6.2",
"tslint": "~6.0.0",
"tslint": "^6.1.1",
"typescript": "~3.7.5"
}
}

View File

@ -13,6 +13,7 @@ const LocalstoragePreferences = {
themeName: 'light-watermelon',
themeClass: 'theme-light-watermelon',
lang: 'fr',
myPolls: [],
};
/**