Skip to content

Commit

Permalink
fix(FEC-13600): Synchronize between Lint & prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTGold committed Jan 1, 2024
1 parent e50c988 commit 2888376
Show file tree
Hide file tree
Showing 27 changed files with 486 additions and 453 deletions.
53 changes: 17 additions & 36 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint"],
"extends": ["plugin:prettier/recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"plugins": ["prettier", "@typescript-eslint"],
"rules": {
"indent": ["error", 2],
"react/prefer-stateless-function": "off",
"max-len": ["warn", {"code": 500}],
"max-len": [
"error",
{
"code": 150,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreUrls": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"eol-last": "off",
"prettier/prettier": "off",
"prettier/prettier": "error",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "error",
// "@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
Expand All @@ -26,44 +35,16 @@
}
}
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"Function": false // Overrides the rule for "Function" type only
}
}
],
"block-scoped-var": "error",
"eqeqeq": "error",
"no-var": "error",
"no-console": "error",
"prefer-const": "error",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",
"quotes": ["warn", "single", {"avoidEscape": true}],
"no-restricted-properties": [
"error",
{
"object": "describe",
"property": "only"
},
{
"object": "it",
"property": "only"
}
]
"prefer-const": "error"
},
"overrides": [],
"settings": {
"jest": {
"version": 26
}
},
"settings": {},
"env": {
"browser": true,
"commonjs": true,
"es6": true
}
}
7 changes: 1 addition & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{
"printWidth": 150,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "preserve"
"arrowParens": "always"
}
4 changes: 2 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const webpackConfig = require('./webpack.config')( null, {mode: 'development'});
const webpackConfig = require('./webpack.config')(null, { mode: 'development' });
delete webpackConfig.entry;
delete webpackConfig.externals;
delete webpackConfig.output;
Expand All @@ -17,7 +17,7 @@ module.exports = function (config) {
},
reporters: ['mocha'],
mochaReporter: {
showDiff: true,
showDiff: true
},

coverageIstanbulReporter: {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"build": "yarn run build:prod && yarn run build:types",
"build:types": "tsc --build tsconfig-lib.json && mkdir -p lib && api-extractor run --local",
"type-check": "tsc --noEmit",
"type-check:watch": "yarn run type-check -- --watch",
"type-check:watch": "yarn run type-check --watch",
"lint": "eslint src/ --ext .js --ext .ts",
"lint:fix": "yarn run lint -- --fix",
"lint:fix": "yarn run lint --fix",
"prettier": "prettier --write .",
"test": "karma start karma.conf.js",
"test:debug": "DEBUG_UNIT_TESTS=1 karma start karma.conf.js --auto-watch --no-single-run --browsers Chrome",
Expand Down Expand Up @@ -67,7 +67,8 @@
"chai": "^4.3.6",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
"eslint": "^8.54.0",
"eslint": "^8.56.0",
"eslint-plugin-prettier": "^5.1.2",
"karma": "^6.4.0",
"karma-chrome-launcher": "^3.1.1",
"karma-firefox-launcher": "^1.3.0",
Expand All @@ -77,7 +78,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^5.0.0",
"mocha": "^10.0.0",
"prettier": "^3.0.3",
"prettier": "^3.1.1",
"shaka-player": "4.7.0",
"sinon": "^14.0.0",
"sinon-chai": "^3.7.0",
Expand Down
Loading

0 comments on commit 2888376

Please sign in to comment.