Skip to content

Commit

Permalink
chore: prettier fix styles (#33)
Browse files Browse the repository at this point in the history
* fix prettier formattings

* try to see if husky is fixing styles with prettier

* try to see if husky is fixing styles with prettier

* try commit without style

* fix order of eslint and prettier
  • Loading branch information
sedghi authored Mar 30, 2022
1 parent c11aae4 commit 00034ed
Show file tree
Hide file tree
Showing 609 changed files with 25,435 additions and 25,482 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ defaults: &defaults
environment:
TERM: xterm # Enable colors in term


jobs:
CHECKOUT:
<<: *defaults
Expand Down Expand Up @@ -103,7 +102,7 @@ jobs:
- attach_workspace:
at: ./
- run: # print the name of the branch we're on
name: "What branch am I on?"
name: 'What branch am I on?'
command: echo ${CIRCLE_BRANCH}
- run:
name: Deploy to Netlify
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"printWidth": 80,
"proseWrap": "preserve",
"tabWidth": 2,
"semi": false,
"semi": true,
"singleQuote": true,
"arrowParens": "always"
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"eslint.autoFixOnSave": true,
"eslint.alwaysShowStatus": true,
"eslint.options": {
"extensions": [ ".html", ".js", ".vue", ".jsx" ]
"extensions": [".html", ".js", ".vue", ".jsx"]
},
"eslint.validate": [
{ "language": "html", "autoFix": true },
Expand All @@ -30,5 +30,5 @@
"workbench.colorCustomizations": {},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
}
}
4 changes: 2 additions & 2 deletions .webpack/excludeNodeModulesExcept.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ function excludeNodeModulesExcept(modules) {
if (pathSep == '\\')
// must be quoted for use in a regexp:
pathSep = '\\\\';
var moduleRegExps = modules.map(function(modName) {
var moduleRegExps = modules.map(function (modName) {
return new RegExp('node_modules' + pathSep + modName);
});

return function(modulePath) {
return function (modulePath) {
if (/cornerstoneWADOImageLoader/.test(modulePath)) {
return true;
}
Expand Down
20 changes: 10 additions & 10 deletions .webpack/webpack.base.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const path = require('path')
const webpack = require('webpack')
const path = require('path');
const webpack = require('webpack');
// Plugins
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const BundleAnalyzerPlugin =
require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
//
const PROJECT_ROOT = path.join(__dirname, '../')
const SRC_PATH = path.join(PROJECT_ROOT, './src')
const PROJECT_ROOT = path.join(__dirname, '../');
const SRC_PATH = path.join(PROJECT_ROOT, './src');
const NODE_ENV = process.env.NODE_ENV;
const excludeNodeModulesExcept = require('./excludeNodeModulesExcept.js');

Expand All @@ -20,8 +20,8 @@ const exclude = excludeNodeModulesExcept([]);
*/
module.exports = (env, argv, { DIST_DIR }) => {
const mode = NODE_ENV === 'production' ? 'production' : 'development';
const isProdBuild = argv.mode !== 'development'
const outputFilename = isProdBuild ? '[name].umd.min.js' : '[name].umd.js'
const isProdBuild = argv.mode !== 'development';
const outputFilename = isProdBuild ? '[name].umd.min.js' : '[name].umd.js';

const config = {
devtool: 'eval-source-map',
Expand Down Expand Up @@ -81,4 +81,4 @@ module.exports = (env, argv, { DIST_DIR }) => {
};

return config;
}
};
3 changes: 1 addition & 2 deletions .webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const baseConfig = webpackBase(env, argv, { SRC_DIR, DIST_DIR });

return merge(baseConfig, {
});
return merge(baseConfig, {});
};
38 changes: 19 additions & 19 deletions .webpack/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
const path = require('path')
const webpack = require('webpack')
const autoprefixer = require('autoprefixer')
const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
// Plugins
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyPlugin = require('copy-webpack-plugin')
const excludeNodeModulesExcept = require('./excludeNodeModulesExcept.js')
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const excludeNodeModulesExcept = require('./excludeNodeModulesExcept.js');

const NODE_ENV = process.NODE_ENV
const NODE_ENV = process.NODE_ENV;

// PATHS
const PROJECT_ROOT = path.join(__dirname, '..', 'packages/demo')
const ENTRY_DEMO = path.join(PROJECT_ROOT, 'src/index.tsx')
const OUT_PATH = path.join(__dirname, '..', 'packages', 'demo', 'dist')
const PROJECT_ROOT = path.join(__dirname, '..', 'packages/demo');
const ENTRY_DEMO = path.join(PROJECT_ROOT, 'src/index.tsx');
const OUT_PATH = path.join(__dirname, '..', 'packages', 'demo', 'dist');

const csRenderBasePath = path.resolve('../core/src/index')
const csToolsBasePath = path.resolve('../tools/src/index')
const csRenderBasePath = path.resolve('../core/src/index');
const csToolsBasePath = path.resolve('../tools/src/index');
const csStreamingBasePath = path.resolve(
'../streaming-image-volume-loader/src/index'
)
);

const exclude = excludeNodeModulesExcept([])
const exclude = excludeNodeModulesExcept([]);

module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
const mode = NODE_ENV === 'production' ? 'production' : 'development'
const mode = NODE_ENV === 'production' ? 'production' : 'development';
// const baseConfig = webpackBase(env, argv, { SRC_DIR, DIST_DIR });

// return merge(baseConfig, {
Expand Down Expand Up @@ -86,7 +86,7 @@ module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
},
],
},
]
],
},
resolve: {
modules: [path.resolve(__dirname, './../node_modules')],
Expand All @@ -99,7 +99,7 @@ module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
'@cornerstonejs/core': csRenderBasePath,
'@cornerstonejs/tools': csToolsBasePath,
'@cornerstonejs/streaming-image-volume-loader': csStreamingBasePath,
}
},
},
plugins: [
// Show build progress
Expand Down Expand Up @@ -133,5 +133,5 @@ module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
'Cross-Origin-Opener-Policy': 'same-origin',
},
},
}
}
};
};
29 changes: 14 additions & 15 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand All @@ -18,23 +17,23 @@ 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,
- 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
- 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
- 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,
- 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
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -120,14 +119,14 @@ version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
[Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Cornerstone is a set of JavaScript libraries that can be used to build web-based medical imaging applications. It provides a framework to build radiology applications such as the [OHIF Viewer](https://ohif.org/).

* **Fast:** Cornerstone leverages WebGL to provide high-performance image rendering and WebAssembly for fast image decompression.
* **Flexible:** Cornerstone provides APIs for defining custom image, volume, and metadata loading schemes, allowing developers to easily connect with proprietary image archives.
* **Community Driven:** Cornerstone is supported by the [Open Health Imaging Foundation](https://ohif.org/). We publish our roadmap and welcome contributions and collaboration.
* **Standards Compliant:** Cornerstone's core focus is Radiology, so it provides DICOMweb compatibility out-of-the-box.
- **Fast:** Cornerstone leverages WebGL to provide high-performance image rendering and WebAssembly for fast image decompression.
- **Flexible:** Cornerstone provides APIs for defining custom image, volume, and metadata loading schemes, allowing developers to easily connect with proprietary image archives.
- **Community Driven:** Cornerstone is supported by the [Open Health Imaging Foundation](https://ohif.org/). We publish our roadmap and welcome contributions and collaboration.
- **Standards Compliant:** Cornerstone's core focus is Radiology, so it provides DICOMweb compatibility out-of-the-box.

[Learn how to use Cornerstone in your project](https://cs3d-docs.netlify.app/docs/introduction/overview).

Expand All @@ -15,21 +15,20 @@ You can find the Cornerstone documentation [on the website](https://cornerstonej

The documentation is divided into several sections:

* [Tutorial](https://cs3d-docs.netlify.app/docs/category/tutorials)
* [Main Concepts](https://cs3d-docs.netlify.app/docs/category/concepts)
* [Live Examples](https://cs3d-docs.netlify.app/examples/)
* [API Reference](https://cs3d-docs.netlify.app/api)
* [How-to Guides](https://cs3d-docs.netlify.app/docs/category/how-to-guides)
* [FAQ](https://cs3d-docs.netlify.app/docs/faq)
* [How-to Contribute](https://cs3d-docs.netlify.app/docs/category/contributing)
- [Tutorial](https://cs3d-docs.netlify.app/docs/category/tutorials)
- [Main Concepts](https://cs3d-docs.netlify.app/docs/category/concepts)
- [Live Examples](https://cs3d-docs.netlify.app/examples/)
- [API Reference](https://cs3d-docs.netlify.app/api)
- [How-to Guides](https://cs3d-docs.netlify.app/docs/category/how-to-guides)
- [FAQ](https://cs3d-docs.netlify.app/docs/faq)
- [How-to Contribute](https://cs3d-docs.netlify.app/docs/category/contributing)

## Support

Users can post questions and issues on the [Open Health Imaging Foundation (OHIF) Community Forum](https://community.ohif.org/). Developer issues or bugs can be reported as [Github Issues](https://github.com/cornerstonejs/cornerstone3D/issues).

The [OHIF Resources page](https://v3-docs.ohif.org/resources) may be of interest to Cornerstone users, as it includes presentations and demonstrations of OHIF and Cornerstone.


## Contributing

### [Code of Conduct](./CODE_OF_CONDUCT.md)
Expand Down
9 changes: 6 additions & 3 deletions api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
* This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been
* local files for library1.
*/
"bundledPackages": ["@cornerstonejs/core", "@cornerstonejs/tools", "@cornerstonejs/streaming-image-volume-loader"],
"bundledPackages": [
"@cornerstonejs/core",
"@cornerstonejs/tools",
"@cornerstonejs/streaming-image-volume-loader"
],

/**
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
Expand Down Expand Up @@ -225,7 +229,7 @@
*
* DEFAULT VALUE: true
*/
"enabled": true,
"enabled": true
/**
* Specifies where the TSDoc metadata file should be written.
*
Expand Down Expand Up @@ -315,7 +319,6 @@
// "addToApiReportFile": false
},


"ae-forgotten-export": {
"logLevel": "none",
"addToApiReportFile": false
Expand Down
6 changes: 3 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = (api) => {
api.cache(true)
api.cache(true);

return {
presets: [
Expand All @@ -12,5 +12,5 @@ module.exports = (api) => {
'@babel/plugin-transform-runtime',
'@babel/plugin-transform-typescript',
],
}
}
};
};
Loading

0 comments on commit 00034ed

Please sign in to comment.