Skip to content

Commit

Permalink
chore: format using make (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas authored Sep 23, 2022
1 parent 28e7e4d commit 34cc910
Show file tree
Hide file tree
Showing 35 changed files with 1,178 additions and 1,129 deletions.
24 changes: 12 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ module.exports = {
env: {
browser: true,
es6: true,
node: true
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended'
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
],
overrides: [],
parser: '@typescript-eslint/parser',
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: './',
tsconfigRootDir: "./",
ecmaVersion: 2021,
sourceType: 'module',
sourceType: "module",
ecmaFeatures: {
jsx: true
}
jsx: true,
},
},
plugins: ['react', '@typescript-eslint'],
rules: {}
};
plugins: ["react", "@typescript-eslint"],
rules: {},
}
17 changes: 17 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Format

on:
pull_request:
push:

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- run: make format
- name: Indicate formatting issues
run: git diff HEAD --exit-code --color
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
node-version: "14"
- run: npm ci
- run: npm version --no-git-tag-version ${{ github.event.release.tag_name }}
- run:
npm version --no-git-tag-version ${{ github.event.release.tag_name }}
- run: npm run build
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_AENEASR }}" > ~/.npmrc
- run:
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_AENEASR
}}" > ~/.npmrc
- run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_AENEASR }}
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ node_modules
.vscode
playwright-report
public
storybook-static
storybook-static
.github/pull_request_template.md
CONTRIBUTING.md
54 changes: 27 additions & 27 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
const { vanillaExtractPlugin } = require('@vanilla-extract/vite-plugin');
const { resolve } = require('path');
const { mergeConfig } = require('vite');
const { vanillaExtractPlugin } = require("@vanilla-extract/vite-plugin")
const { resolve } = require("path")
const { mergeConfig } = require("vite")

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions'
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: '@storybook/react',
framework: "@storybook/react",
core: {
builder: '@storybook/builder-vite'
builder: "@storybook/builder-vite",
},
typescript: {
reactDocgen: 'react-docgen' // 👈 react-docgen configured here.
reactDocgen: "react-docgen", // 👈 react-docgen configured here.
},
async viteFinal(config) {
return mergeConfig(config, {
build: {
minify: 'esbuild',
minify: "esbuild",
sourcemap: true,
lib: {
entry: resolve(__dirname, 'src/react.ts'),
name: 'ory/elements',
fileName: (format) => `index.${format}.js`
entry: resolve(__dirname, "src/react.ts"),
name: "ory/elements",
fileName: (format) => `index.${format}.js`,
},
rollupOptions: {
treeshake: 'recommended',
external: ['react', 'react-dom', 'storybook'],
treeshake: "recommended",
external: ["react", "react-dom", "storybook"],
output: {
globals: {
storybook: 'storybook',
react: 'React',
'react-dom': 'ReactDOM'
}
}
}
storybook: "storybook",
react: "React",
"react-dom": "ReactDOM",
},
},
},
},
plugins: [vanillaExtractPlugin()]
});
plugins: [vanillaExtractPlugin()],
})
},
features: {
storyStoreV7: true
}
};
storyStoreV7: true,
},
}
4 changes: 2 additions & 2 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<script>
window.global = window;
</script>
window.global = window
</script>
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ install:

.bin/ory: Makefile
bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -d -b .bin ory v0.1.38
touch -a -m .bin/ory
touch -a -m .bin/ory

format: node_modules
npm exec -- prettier --write .

node_modules: package-lock.json
npm ci
touch node_modules
Loading

0 comments on commit 34cc910

Please sign in to comment.