From 5cc0374e6715184f8c30f927df13599789826c87 Mon Sep 17 00:00:00 2001
From: "p.kabir"
Date: Mon, 20 May 2019 16:40:20 +0300
Subject: [PATCH] First commit
---
.prettierrc.js | 12 ++++++++
index.js | 72 +++++++++++++++++++++++++++++++++++++++++++++++
package-lock.json | 14 +++++++++
package.json | 29 +++++++++++++++++++
4 files changed, 127 insertions(+)
create mode 100644 .prettierrc.js
create mode 100644 index.js
create mode 100644 package-lock.json
create mode 100644 package.json
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 0000000..b47a38f
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,12 @@
+module.exports = {
+ trailingComma: 'es5',
+ singleQuote: true,
+ printWidth: 80,
+ tabWidth: 4,
+ semi: true,
+ jsxSingleQuote: true,
+ bracketSpacing: true,
+ jsxBracketSameLine: false,
+ arrowParens: 'avoid',
+ parser: 'typescript',
+};
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..6bb08c7
--- /dev/null
+++ b/index.js
@@ -0,0 +1,72 @@
+module.exports = {
+ parser: '@typescript-eslint/parser',
+ parserOptions: {
+ ecmaVersion: 2018,
+ sourceType: 'module',
+ ecmaFeatures: {
+ jsx: true,
+ },
+ },
+ plugins: ['eslint-plugin-import'],
+ rules: {
+ 'import/newline-after-import': ['error', { count: 1 }],
+ 'lines-between-class-members': [
+ 'error',
+ 'always',
+ { exceptAfterSingleLine: true },
+ ],
+ 'padding-line-between-statements': [
+ 'error',
+ {
+ blankLine: 'always',
+ prev: 'multiline-block-like',
+ next: '*',
+ },
+ {
+ blankLine: 'always',
+ prev: '*',
+ next: 'multiline-block-like',
+ },
+ {
+ blankLine: 'always',
+ prev: 'multiline-const',
+ next: '*',
+ },
+ {
+ blankLine: 'always',
+ prev: '*',
+ next: 'multiline-const',
+ },
+ {
+ blankLine: 'always',
+ prev: 'multiline-var',
+ next: '*',
+ },
+ {
+ blankLine: 'always',
+ prev: '*',
+ next: 'multiline-var',
+ },
+ {
+ blankLine: 'always',
+ prev: 'multiline-let',
+ next: '*',
+ },
+ {
+ blankLine: 'always',
+ prev: '*',
+ next: 'multiline-let',
+ },
+ {
+ blankLine: 'always',
+ prev: 'multiline-expression',
+ next: '*',
+ },
+ {
+ blankLine: 'always',
+ prev: '*',
+ next: 'multiline-expression',
+ },
+ ],
+ },
+};
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..685bce4
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,14 @@
+{
+ "name": "eslint-config-clean-code",
+ "version": "0.0.1",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "prettier": {
+ "version": "1.17.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.1.tgz",
+ "integrity": "sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==",
+ "dev": true
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..f4caa14
--- /dev/null
+++ b/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "eslint-config-clean-code",
+ "version": "0.0.1",
+ "description": "ESLint Configuration for Clean Typescript Code",
+ "main": "index.js",
+ "scripts": {
+ "fixStyleFull": "prettier \"**/*.{ts,tsx,js,jsx}\" --write"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wh1t3cAt1k/eslint-config-clean-code.git"
+ },
+ "keywords": [
+ "eslint",
+ "config",
+ "clean",
+ "code"
+ ],
+ "author": "Pavel Kabir",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/wh1t3cAt1k/eslint-config-clean-code/issues"
+ },
+ "homepage": "https://github.com/wh1t3cAt1k/eslint-config-clean-code#readme",
+ "devDependencies": {
+ "prettier": "^1.17.1"
+ },
+ "dependencies": {}
+}