Skip to content

Commit

Permalink
Merge pull request #1 from empathyco/kickoff-repo
Browse files Browse the repository at this point in the history
feat: kickoff repo
  • Loading branch information
joseacabaneros authored Oct 18, 2024
2 parents 5df8579 + 0bc49be commit b1724f1
Show file tree
Hide file tree
Showing 11 changed files with 7,627 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Stop the editor from looking for .editorconfig files in the parent directories
# root = true

[*]
# Non-configurable Prettier behaviors
charset = utf-8
insert_final_newline = true
# Caveat: Prettier won’t trim trailing whitespace inside template strings, but your editor might.
# trim_trailing_whitespace = true

# Configurable Prettier behaviors
# (change these if your Prettier config differs)
end_of_line = lf
indent_style = space
indent_size = 2
max_line_length = 100
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.DS_Store
node_modules
/dist
/coverage
/output
stats.html
.cache

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Lint cache
.eslintcache
.stylelintcache
/.cache

# Motive
.loaded_actions
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
# eslint-config
ESLint config preset
# @empathyco/eslint-config

- [@antfu/eslint-config](https://github.com/antfu/eslint-config) as default ESLint config preset.
- [Prettier](https://github.com/prettier/prettier) as code formatter sharing config preset.
- [@eslint/config-inspector](https://github.com/eslint/config-inspector) the visual tool for inspecting and understanding your ESLint flat configs.

## Usage

### Install

```bash
npm i -D eslint @empathyco/eslint-config
```

And create `eslint.config.mjs` in your project root:

```js
// eslint.config.mjs
import { empathyco } from '@empathyco/eslint-config';

export default empathyco();
```

### Add script for package.json

For example:

```json
{
"scripts": {
"lint": "eslint --fix .",
"lint:check": "eslint .",
"lint:inspect": "eslint --inspect-config .",
"format": "prettier --write .",
"format:check": "prettier --check ."
}
}
```
3 changes: 3 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { empathyco } from './src';

export default empathyco();
Loading

0 comments on commit b1724f1

Please sign in to comment.