diff --git a/.eslintrc.json b/.eslintrc.json index 9de9f7ba..c00997e8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "sourceType": "module" }, "plugins": ["@typescript-eslint", "jsdoc"], - "extends": ["plugin:jsdoc/recommended"], + "extends": ["plugin:jsdoc/recommended", "prettier"], "rules": { "@typescript-eslint/naming-convention": ["error", { diff --git a/package-lock.json b/package-lock.json index 82ed19a5..64d2c9f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15147,6 +15147,12 @@ } } }, + "eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true + }, "eslint-plugin-jsdoc": { "version": "36.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-36.1.0.tgz", diff --git a/package.json b/package.json index b7305e6a..2f3ee4af 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "coveralls": "3.1.1", "css-loader": "6.3.0", "eslint": "7.32.0", + "eslint-config-prettier": "^8.3.0", "eslint-plugin-jsdoc": "36.1.0", "excalibur-jasmine": "0.2.0", "istanbul": "0.4.5", diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..4904cf55 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,12 @@ +// .prettierrc.js +module.exports = { + printWidth: 140, + singleQuote: true, + trailingComma: 'none', + arrowParens: 'always', + overrides: [ + { + files: '{src,sandbox/src,sandbox/tests}/**/*.{ts,js,json,css,md}' + } + ] +}; diff --git a/webpack.config.js b/webpack.config.js index f4be7533..15ff44fb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,8 +10,8 @@ const dt = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate(); module.exports = { mode: 'development', devtool: 'source-map', - entry: { - 'excalibur': './index.ts', + entry: { + excalibur: './index.ts', 'excalibur.min': './index.ts' }, context: path.resolve(__dirname, 'src/engine'),