Skip to content

Commit

Permalink
Merge pull request #24 from nhn/feat/v9.0.0
Browse files Browse the repository at this point in the history
feat: version up 6.0.0 for eslint rule 9.0.0 and support flat config
  • Loading branch information
sunyoungBae authored Dec 3, 2024
2 parents 634ed53 + 01fc0e9 commit 3582f6c
Show file tree
Hide file tree
Showing 4 changed files with 1,031 additions and 17 deletions.
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,37 @@
#### ESLint sharable config for TUI components

## Install

```
$ npm install eslint eslint-config-tui --save-dev
```

## Usage
Add `.eslintrc.js` on your project's root directory.

> **Note:** If you have configured your project to use ESM (ECMAScript Modules) format, you can also write your ESLint configuration using the filename `eslint.config.js`.
```javascript
// .eslintrc.js
module.exports = {
'extends': 'tui',
'rules': {
// Override rules or Add more rules
}
};
// eslint.config.mjs
import tui from 'eslint-config-tui';

export default [
tui,
{
rules: {
// Override rules or Add more rules
},
},
];
```

If you want to distinguish with `tui/es6`, use a version before 5.0.0

## Learn more

[JavaScript Style Guide](https://github.com/nhn/fe.javascript/wiki)

[Configuring ESLint](http://eslint.org/docs/user-guide/configuring)

## License

This software is licensed under the [MIT](https://github.com/nhn/tui.eslint.config/blob/master/LICENSE) © [NHN Cloud](https://github.com/nhn).
22 changes: 17 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
module.exports = {
extends: ["./rules/possible", "./rules/suggestion", "./rules/layout"].map(require.resolve),
env: {
browser: true,
const globals = require('globals');

const possibleConfig = require('./rules/possible');
const suggestionConfig = require('./rules/suggestion');
const layoutConfig = require('./rules/layout');

module.exports = [
...possibleConfig,
...suggestionConfig,
...layoutConfig,
{
languageOptions: {
globals: {
...globals.browser,
},
},
},
};
];
Loading

0 comments on commit 3582f6c

Please sign in to comment.