Skip to content

Commit

Permalink
0.1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
hong6316 committed May 17, 2023
2 parents 73290b9 + 930b16c commit 9a899e3
Show file tree
Hide file tree
Showing 6 changed files with 3,579 additions and 46,693 deletions.
105 changes: 102 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,109 @@
module.exports = {
root: true,
globals: {
__DEV__: true,
process: true,
window: true,
document: true
},
env: {
node: true
},
extends: ['enact', 'plugin:prettier/recommended', 'prettier'],
plugins: ['import'],
extends: ['eslint:recommended', 'plugin:prettier/recommended', 'prettier'],
parser: '@babel/eslint-parser',
parserOptions: {
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
presets: [require.resolve('./index.js')]
}
},
plugins: ['@babel', 'import'],
rules: {
'block-scoped-var': 'warn',
'curly': ['warn', 'multi-line'],
'eqeqeq': ['warn', 'smart'],
'new-parens': 'warn',
'no-alert': 'warn',
'no-array-constructor': 'warn',
'no-caller': 'error',
'no-catch-shadow': 'error',
'no-cond-assign': ['warn', 'except-parens'],
'no-constant-condition': 'warn',
'no-control-regex': 'off',
'no-debugger': 'off',
'no-div-regex': 'warn',
'no-empty': 'warn',
'no-eval': 'warn',
'no-extend-native': 'warn',
'no-extra-bind': 'warn',
'no-extra-boolean-cast': 'warn',
'no-extra-semi': 'off',
'no-fallthrough': 'warn',
'no-floating-decimal': 'warn',
'no-func-assign': 'warn',
'no-implied-eval': 'warn',
'no-inner-declarations': 'off',
'no-irregular-whitespace': 'warn',
'no-iterator': 'error',
'no-label-var': 'error',
'no-labels': 'error',
'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'],
'no-global-assign': 'error',
'no-unsafe-negation': 'error',
'no-new-func': 'error',
'no-new-object': 'warn',
'no-new-wrappers': 'warn',
'no-octal-escape': 'warn',
'no-proto': 'error',
'no-redeclare': [
'error',
{
builtinGlobals: true
}
],
'no-regex-spaces': 'warn',
'no-return-assign': ['warn', 'except-parens'],
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'warn',
'no-shadow': [
'warn',
{
builtinGlobals: true,
hoist: 'all',
allow: ['context']
}
],
'no-throw-literal': 'error',
'no-trailing-spaces': 'warn',
'no-unexpected-multiline': 'warn',
'no-unneeded-ternary': 'warn',
'no-unreachable': 'warn',
'no-unused-vars': 'warn',
'no-use-before-define': [
'warn',
{
functions: false
}
],
'no-useless-call': 'warn',
'no-useless-escape': 'off',
'no-var': 'warn',
'require-yield': 'off',
'use-isnan': 'warn',
'wrap-iife': ['error', 'inside'],

// babel plugin https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin
'@babel/new-cap': [
'error',
{
newIsCap: true,
capIsNew: false
}
],
'@babel/no-unused-expressions': 'warn',

'import/no-unresolved': ['error', {commonjs: true, caseSensitive: true}],
'import/named': 'error',
'import/first': 'warn',
Expand All @@ -15,7 +114,7 @@ module.exports = {
'warn',
{
'newlines-between': 'never',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index']
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index']
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.2 (May 17, 2023)

* Updated `core-js` version of `@babel/preset-env` to `3.19`.

## 0.1.1 (February 17, 2023)

* Updated Babel support:
Expand Down
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,49 @@

> This package includes the Babel preset used by Enact.
## Installation
## Usage in Enact projects created by Enact CLI

The easiest way to use this configuration is with [Enact CLI](https://github.com/enactjs/cli), which includes it by default. You don’t need to install it separately in Enact projects.

## Usage Outside of Enact projects

If you want to use this Babel preset in a project not built with Enact CLI, you can install it with the following steps.

First, [install Babel](https://babeljs.io/docs/setup/).

Then install babel-preset-enact.

```sh
$ npm i --save babel-preset-enact
npm install babel-preset-enact --save-dev
```

Then create a file named `.babelrc` with the following contents in the root folder of your project:

```json
{
"presets": ["babel-preset-enact"]
}
```

For more information including `.babelrc` setup, please see the [Babel docs](https://babeljs.io/docs/config-files).

## Copyright and License Information

Unless otherwise specified, all content, including all source code files and
documentation files in this repository are:

Copyright (c) 2023 LG Electronics

Unless otherwise specified or set forth in the NOTICE file, all content,
including all source code files and documentation files in this repository are:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this content except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = function (api) {
],
forceAllTransforms: es5Standalone,
useBuiltIns: 'entry',
corejs: 3
corejs: '3.19'
}
],
[
Expand Down
Loading

0 comments on commit 9a899e3

Please sign in to comment.