Skip to content

Commit

Permalink
Merge pull request #7 from srmagura/change-prettier-settings
Browse files Browse the repository at this point in the history
Change prettier settings
  • Loading branch information
srmagura authored Apr 13, 2023
2 parents 07f255e + fee2cff commit 8f49c33
Show file tree
Hide file tree
Showing 20 changed files with 1,366 additions and 1,336 deletions.
18 changes: 9 additions & 9 deletions .config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const path = require('path')
const path = require('path');

module.exports = {
timers: 'fake',
resetMocks: true,
timers: 'fake',
resetMocks: true,

rootDir: path.resolve(__dirname, '..'),
testMatch: ['**/__tests__/**/*.test.ts?(x)'],
rootDir: path.resolve(__dirname, '..'),
testMatch: ['**/__tests__/**/*.test.ts?(x)'],

transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
}
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
};
28 changes: 14 additions & 14 deletions .config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import typescript from '@rollup/plugin-typescript'
import typescript from '@rollup/plugin-typescript';

export default {
input: 'src/index.ts',
output: [
{
file: 'dist/index.mjs',
format: 'es',
},
{
dir: 'dist',
format: 'cjs',
},
],
plugins: [typescript({ exclude: '**/__tests__/**/*' })],
}
input: 'src/index.ts',
output: [
{
file: 'dist/index.mjs',
format: 'es',
},
{
dir: 'dist',
format: 'cjs',
},
],
plugins: [typescript({ exclude: '**/__tests__/**/*' })],
};
2 changes: 1 addition & 1 deletion .config/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"out": "../docs"
"out": "../docs"
}
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
78 changes: 39 additions & 39 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
module.exports = {
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:promise/recommended',
'plugin:jest/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
plugins: ['promise', 'jest'],
parserOptions: {
project: './tsconfig.json',
},
ignorePatterns: ['*.cjs', 'dist/', 'docs/'],
rules: {
'import/prefer-default-export': 'off',
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:promise/recommended',
'plugin:jest/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
plugins: ['promise', 'jest'],
parserOptions: {
project: './tsconfig.json',
},
ignorePatterns: ['*.cjs', 'dist/', 'docs/'],
rules: {
'import/prefer-default-export': 'off',

'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-restricted-syntax': [
'error',
// Options from https://github.com/airbnb/javascript/blob/651280e5a22d08170187bea9a2b1697832c87ebc/packages/eslint-config-airbnb-base/rules/style.js
// with for-of removed
{
selector: 'ForInStatement',
message:
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
},
{
selector: 'LabeledStatement',
message:
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message:
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
],
},
}
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-restricted-syntax': [
'error',
// Options from https://github.com/airbnb/javascript/blob/651280e5a22d08170187bea9a2b1697832c87ebc/packages/eslint-config-airbnb-base/rules/style.js
// with for-of removed
{
selector: 'ForInStatement',
message:
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
},
{
selector: 'LabeledStatement',
message:
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message:
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
],
},
};
30 changes: 15 additions & 15 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ A clear and concise description of what you expected to happen.

**Versions**

- real-cancellable-promise version:
- Browser / Node / React Native version:
- real-cancellable-promise version:
- Browser / Node / React Native version:

**Additional context**
Add any other context about the problem here.
6 changes: 2 additions & 4 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
semi: false,
singleQuote: true,
printWidth: 90,
}
singleQuote: true,
};
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

### Bug Fixes

- Make the `capture` function of `buildCancellablePromise` an identity function
from a type perspective.
- Make the `capture` function of `buildCancellablePromise` an identity function
from a type perspective.

## 1.1.1

### Bug Fixes

- Fix `CancellablePromise<T>` not being assignable to `Promise<T>`
- Fix `CancellablePromise<T>` not being assignable to `Promise<T>`

## 1.1.0

### Features

- Publish ES module
- Publish ES module

## 1.0.0

Expand Down
Loading

0 comments on commit 8f49c33

Please sign in to comment.